Use the file in the inlined die rather than the compile unit for
authorEric Christopher <echristo@apple.com>
Mon, 26 Mar 2012 21:38:38 +0000 (21:38 +0000)
committerEric Christopher <echristo@apple.com>
Mon, 26 Mar 2012 21:38:38 +0000 (21:38 +0000)
backtrace locations.

Testcase forthcoming, but I wanted to get some testing here.

Should fix:

PR12323
PR12314
rdar://11091100

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153471 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/AsmPrinter/DwarfDebug.cpp

index 388cef4d8b8a05cc0e3ef7347c15fc7a3b3c94db..84fc564f4e3dee60f8b802f093c2adef6295157e 100644 (file)
@@ -438,7 +438,8 @@ DIE *DwarfDebug::constructInlinedScopeDIE(CompileUnit *TheCU,
     I->second.push_back(std::make_pair(StartLabel, ScopeDIE));
 
   DILocation DL(Scope->getInlinedAt());
-  TheCU->addUInt(ScopeDIE, dwarf::DW_AT_call_file, 0, TheCU->getID());
+  TheCU->addUInt(ScopeDIE, dwarf::DW_AT_call_file, 0,
+                 GetOrCreateSourceID(DL.getFilename(), DL.getDirectory()));
   TheCU->addUInt(ScopeDIE, dwarf::DW_AT_call_line, 0, DL.getLineNumber());
 
   // Add name to the name table, we do this here because we're guaranteed