summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2013-12-13 06:43:32 +0000
committerDavid Blaikie <dblaikie@gmail.com>2013-12-13 06:43:32 +0000
commit04adff775f96b87ae7318ed294bf7e471250c07c (patch)
tree1527c87f60d09253e1d47ebfdf01f295c51c842f /llvm/lib/CodeGen
parent753c6e4eb29edfce870d1af751b0809b20a955c4 (diff)
downloadbcm5719-llvm-04adff775f96b87ae7318ed294bf7e471250c07c.tar.gz
bcm5719-llvm-04adff775f96b87ae7318ed294bf7e471250c07c.zip
Revert "DebugInfo: Move type units into the debug_types section with appropriate comdat grouping and type unit headers"
This reverts commit r197210. llvm-svn: 197211
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp12
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp24
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h18
3 files changed, 9 insertions, 45 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
index 7c61407e873..27348a4b9b8 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
@@ -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.
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
index 709f5bec031..f87480d290b 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
@@ -1997,27 +1997,3 @@ void DwarfUnit::emitHeader(const MCSection *ASection,
Asm->OutStreamer.AddComment("Address Size (in bytes)");
Asm->EmitInt8(Asm->getDataLayout().getPointerSize());
}
-
-void DwarfTypeUnit::emitHeader(const MCSection *ASection,
- const MCSymbol *ASectionSym) const {
- DwarfUnit::emitHeader(ASection, ASectionSym);
- Asm->OutStreamer.AddComment("Type Signature");
- Asm->OutStreamer.EmitIntValue(TypeSignature, sizeof(TypeSignature));
- Asm->OutStreamer.AddComment("Type DIE Offset");
- Asm->OutStreamer.EmitIntValue(Ty->getOffset(), sizeof(Ty->getOffset()));
-}
-
-void DwarfTypeUnit::initSection(const MCSection *Section) {
- assert(!this->Section);
- this->Section = Section;
- // Since each type unit is contained in its own COMDAT section, the begin
- // label and the section label are the same. Using the begin label emission in
- // DwarfDebug to emit the section label as well is slightly subtle/sneaky, but
- // the only other alternative of lazily constructing start-of-section labels
- // and storing a mapping in DwarfDebug (or AsmPrinter).
- this->SectionSym = this->LabelBegin =
- Asm->GetTempSymbol(Section->getLabelBeginName(), getUniqueID());
- this->LabelEnd =
- Asm->GetTempSymbol(Section->getLabelEndName(), getUniqueID());
- this->LabelRange = Asm->GetTempSymbol("gnu_ranges", getUniqueID());
-}
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h b/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h
index 6242a058cf8..26b5f09004e 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h
@@ -413,15 +413,14 @@ public:
/// Compute the size of a header for this unit, not including the initial
/// length field.
- virtual unsigned getHeaderSize() const {
+ unsigned getHeaderSize() const {
return sizeof(int16_t) + // DWARF version number
sizeof(int32_t) + // Offset Into Abbrev. Section
sizeof(int8_t); // Pointer Size (in bytes)
}
/// Emit the header for this unit, not including the initial length field.
- virtual void emitHeader(const MCSection *ASection,
- const MCSymbol *ASectionSym) const;
+ void emitHeader(const MCSection *ASection, const MCSymbol *ASectionSym) const;
protected:
/// getOrCreateStaticMemberDIE - Create new static data member DIE.
@@ -514,25 +513,12 @@ public:
class DwarfTypeUnit : public DwarfUnit {
private:
uint16_t Language;
- uint64_t TypeSignature;
- const DIE *Ty;
public:
DwarfTypeUnit(unsigned UID, DIE *D, uint16_t Language, AsmPrinter *A,
DwarfDebug *DW, DwarfFile *DWU);
- void setTypeSignature(uint64_t Signature) { TypeSignature = Signature; }
- void setType(const DIE *Ty) { this->Ty = Ty; }
-
uint16_t getLanguage() const LLVM_OVERRIDE { return Language; }
- /// Emit the header for this unit, not including the initial length field.
- void emitHeader(const MCSection *ASection, const MCSymbol *ASectionSym) const
- LLVM_OVERRIDE;
- unsigned getHeaderSize() const LLVM_OVERRIDE {
- return DwarfUnit::getHeaderSize() + sizeof(uint64_t) + // Type Signature
- sizeof(uint32_t); // Type DIE Offset
- }
- void initSection(const MCSection *Section);
};
} // end llvm namespace
#endif
OpenPOWER on IntegriCloud