mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-20 10:24:12 +00:00
DebugInfo: Move type units into the debug_types section with appropriate comdat grouping and type unit headers
This commit does not complete the type units feature - there are issues around fission support (skeletal type units, pubtypes/pubnames) and hashing of some types including those containing references to types in other type units. Originally committed as r197073 and reverted in r197079. This commit originally got jumbled up with another build-breaking commit and I can't find the failures I thought this caused anymore. Recommitting to hopefully get some clean buildbot results to work from. I have a sneaking suspicion there's unstable output in the comdat group output of MCStreamer... git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197197 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -1997,3 +1997,27 @@ 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());
|
||||
}
|
||||
|
Reference in New Issue
Block a user