summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2014-02-12 00:40:47 +0000
committerDavid Blaikie <dblaikie@gmail.com>2014-02-12 00:40:47 +0000
commit9a0eced3af1c0b801811465b8f3ca9afac21f813 (patch)
tree0354bf8bf33b5d9ab7db9b7959a9a34cbbdc8a50 /lib
parentf7943e5f0e5b303f39d9bc029673a92369fa627c (diff)
downloadllvm-9a0eced3af1c0b801811465b8f3ca9afac21f813.tar.gz
llvm-9a0eced3af1c0b801811465b8f3ca9afac21f813.tar.bz2
llvm-9a0eced3af1c0b801811465b8f3ca9afac21f813.tar.xz
DwarfUnit: Include type unit's file strings in the defining compile unit's file_names table
There's still one piece missing here, which is adding the DW_AT_stmt_list to the type unit that refer's to the compile unit's line table. Working on that. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201198 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/CodeGen/AsmPrinter/DwarfUnit.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfUnit.cpp b/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
index 42c1cbf768..a6bae16b69 100644
--- a/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
+++ b/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
@@ -362,7 +362,8 @@ void DwarfUnit::addSourceLine(DIE *Die, unsigned Line, StringRef File,
if (Line == 0)
return;
- unsigned FileID = DD->getOrCreateSourceID(File, Directory, getUniqueID());
+ unsigned FileID =
+ DD->getOrCreateSourceID(File, Directory, getCU().getUniqueID());
assert(FileID && "Invalid file id");
addUInt(Die, dwarf::DW_AT_decl_file, None, FileID);
addUInt(Die, dwarf::DW_AT_decl_line, None, Line);