summaryrefslogtreecommitdiff
path: root/include/llvm
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2014-03-19 00:11:28 +0000
committerDavid Blaikie <dblaikie@gmail.com>2014-03-19 00:11:28 +0000
commit56ce2f5ab83a2975970eeadfc1b61f96b4c50c22 (patch)
treeadc71b1a51c4e96b707b84636bef9c605e90ff0b /include/llvm
parent21354ec60d0dde4f1995d816701b895c57f806bd (diff)
downloadllvm-56ce2f5ab83a2975970eeadfc1b61f96b4c50c22.tar.gz
llvm-56ce2f5ab83a2975970eeadfc1b61f96b4c50c22.tar.bz2
llvm-56ce2f5ab83a2975970eeadfc1b61f96b4c50c22.tar.xz
DebugInfo: Use the comp_dir of the referencing type units when building debug_line.dwo
This isn't a complete fix - it falls back to non-comp_dir when multiple compile units are in play. Adding a map of comp_dir to table is part of the more general solution, but I gave up (in the short term) when I realized I'd also have to calculate the size of each type unit so as to produce correct DW_AT_stmt_list attributes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204202 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm')
-rw-r--r--include/llvm/MC/MCDwarf.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/llvm/MC/MCDwarf.h b/include/llvm/MC/MCDwarf.h
index 508c8305bc..731ffb14fb 100644
--- a/include/llvm/MC/MCDwarf.h
+++ b/include/llvm/MC/MCDwarf.h
@@ -195,6 +195,9 @@ struct MCDwarfLineTableHeader {
class MCDwarfDwoLineTable {
MCDwarfLineTableHeader Header;
public:
+ void setCompilationDir(StringRef CompilationDir) {
+ Header.CompilationDir = CompilationDir;
+ }
unsigned getFile(StringRef Directory, StringRef FileName) {
return Header.getFile(Directory, FileName);
}