From 9a0eced3af1c0b801811465b8f3ca9afac21f813 Mon Sep 17 00:00:00 2001 From: David Blaikie Date: Wed, 12 Feb 2014 00:40:47 +0000 Subject: 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 --- lib/CodeGen/AsmPrinter/DwarfUnit.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/CodeGen') 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); -- cgit v1.2.3