summaryrefslogtreecommitdiff
path: root/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/CodeGen/AsmPrinter/DwarfDebug.cpp')
-rw-r--r--lib/CodeGen/AsmPrinter/DwarfDebug.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
index 27348a4b9b..7c61407e87 100644
--- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+++ b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
@@ -3056,19 +3056,17 @@ void DwarfDebug::addDwarfTypeUnitType(uint16_t Language, DIE *RefDie,
// referenced type, or possibly walk the precomputed hashes of related types
// at the end.
uint64_t Signature = DIEHash().computeTypeSignature(*Die);
+ NewTU->setTypeSignature(Signature);
+ NewTU->setType(Die);
// Remove the References vector and add the type hash.
I->second.first = Signature;
I->second.second = NULL;
NewTU->initSection(
- useSplitDwarf() ? Asm->getObjFileLowering().getDwarfInfoDWOSection()
- : Asm->getObjFileLowering().getDwarfInfoSection(),
- // FIXME: This is subtle (using the info section even when
- // this CU is in the dwo section) and necessary for the
- // current arange code - ideally it should iterate
- // skeleton units, not full units, if it's going to reference skeletons
- useSplitDwarf() ? NULL : DwarfInfoSectionSym);
+ useSplitDwarf()
+ ? Asm->getObjFileLowering().getDwarfTypesDWOSection(Signature)
+ : Asm->getObjFileLowering().getDwarfTypesSection(Signature));
}
// Populate all the signatures.