aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
diff options
context:
space:
mode:
authorEric Christopher <echristo@gmail.com>2013-05-08 00:58:51 +0000
committerEric Christopher <echristo@gmail.com>2013-05-08 00:58:51 +0000
commit9c57ad2381488b7cde7e3eb459d2ce3e447e93b7 (patch)
tree7702f78b8845c5ac8f4a4ccbeeff6ab515542730 /lib/CodeGen/AsmPrinter/DwarfDebug.cpp
parent1db3d0820f8057dd03ade1585bfa5f2bf53cfe33 (diff)
Pass the MDNode in and do the insertion at compile unit creation time
instead of relying upon an extra call to finish initializing. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181383 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/AsmPrinter/DwarfDebug.cpp')
-rw-r--r--lib/CodeGen/AsmPrinter/DwarfDebug.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
index 06b0c865e1..8864baa5c2 100644
--- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+++ b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
@@ -683,9 +683,8 @@ CompileUnit *DwarfDebug::constructCompileUnit(const MDNode *N) {
DIE *Die = new DIE(dwarf::DW_TAG_compile_unit);
CompileUnit *NewCU = new CompileUnit(GlobalCUIndexCount++,
- DIUnit.getLanguage(), Die, Asm,
+ DIUnit.getLanguage(), Die, N, Asm,
this, &InfoHolder);
- NewCU->insertDIE(N, Die);
FileIDCUMap[NewCU->getUniqueID()] = 0;
// Call this to emit a .file directive if it wasn't emitted for the source
@@ -2587,7 +2586,7 @@ CompileUnit *DwarfDebug::constructSkeletonCU(const MDNode *N) {
DIE *Die = new DIE(dwarf::DW_TAG_compile_unit);
CompileUnit *NewCU = new CompileUnit(GlobalCUIndexCount++,
- DIUnit.getLanguage(), Die, Asm,
+ DIUnit.getLanguage(), Die, N, Asm,
this, &SkeletonHolder);
NewCU->addLocalString(Die, dwarf::DW_AT_GNU_dwo_name,