Revert "DebugInfo: Move type units into the debug_types section with appropriate...
[oota-llvm.git] / lib / CodeGen / AsmPrinter / DwarfDebug.cpp
index 7c61407e8732135eaa7e235ff3dbd814a2c42c59..27348a4b9b86c370e785dc0f72d21e58af36f5c9 100644 (file)
@@ -3056,17 +3056,19 @@ 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().getDwarfTypesDWOSection(Signature)
-            : Asm->getObjFileLowering().getDwarfTypesSection(Signature));
+        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);
   }
 
   // Populate all the signatures.