summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
diff options
context:
space:
mode:
authorEric Christopher <echristo@gmail.com>2013-08-26 23:50:43 +0000
committerEric Christopher <echristo@gmail.com>2013-08-26 23:50:43 +0000
commit6fdf324f4446cb0e56a787f448ee41bd86c27bd2 (patch)
tree4dde1407e3247dfabf2139d6b30ce5987211c39c /llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
parent6d13fe007f2bd24b484c8bcb6ea5e33252f72c06 (diff)
downloadbcm5719-llvm-6fdf324f4446cb0e56a787f448ee41bd86c27bd2.tar.gz
bcm5719-llvm-6fdf324f4446cb0e56a787f448ee41bd86c27bd2.zip
Have the skeleton compile unit construction method take the CU it
is constructing from as an input and keep the same unique identifier. We can use this to connect items which must stay in the .o file (e.g. pubnames and pubtypes) to the skeleton cu rather than having duplicate unique numbers for the sections and needing to do lookups based on MDNode. llvm-svn: 189293
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
index b2d85f369f6..0dba9717c91 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
@@ -1032,7 +1032,7 @@ void DwarfDebug::finalizeModuleInfo() {
TheCU->addUInt(TheCU->getCUDie(), dwarf::DW_AT_GNU_dwo_id,
dwarf::DW_FORM_data8, ID);
// Now construct the skeleton CU associated.
- CompileUnit *SkCU = constructSkeletonCU(CUI->first);
+ CompileUnit *SkCU = constructSkeletonCU(TheCU);
// This should be a unique identifier when we want to build .dwp files.
SkCU->addUInt(SkCU->getCUDie(), dwarf::DW_AT_GNU_dwo_id,
dwarf::DW_FORM_data8, ID);
@@ -2685,12 +2685,12 @@ void DwarfDebug::emitDebugInlineInfo() {
// DW_AT_low_pc, DW_AT_high_pc, DW_AT_ranges, DW_AT_dwo_name, DW_AT_dwo_id,
// DW_AT_ranges_base, DW_AT_addr_base. If DW_AT_ranges is present,
// DW_AT_low_pc and DW_AT_high_pc are not used, and vice versa.
-CompileUnit *DwarfDebug::constructSkeletonCU(const MDNode *N) {
- DICompileUnit DIUnit(N);
+CompileUnit *DwarfDebug::constructSkeletonCU(const CompileUnit *CU) {
+ DICompileUnit DIUnit(CU->getNode());
DIE *Die = new DIE(dwarf::DW_TAG_compile_unit);
- CompileUnit *NewCU =
- new CompileUnit(GlobalCUIndexCount++, Die, N, Asm, this, &SkeletonHolder);
+ CompileUnit *NewCU = new CompileUnit(CU->getUniqueID(), Die, CU->getNode(),
+ Asm, this, &SkeletonHolder);
NewCU->addLocalString(Die, dwarf::DW_AT_GNU_dwo_name,
DIUnit.getSplitDebugFilename());
OpenPOWER on IntegriCloud