mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-15 05:24:01 +00:00
Make the use of DW_AT_ranges in the compile unit depend also upon
the existence of comdat/special sections. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199954 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -179,7 +179,7 @@ static unsigned getDwarfVersionFromModule(const Module *M) {
|
||||
DwarfDebug::DwarfDebug(AsmPrinter *A, Module *M)
|
||||
: Asm(A), MMI(Asm->MMI), FirstCU(0), SourceIdMap(DIEValueAllocator),
|
||||
PrevLabel(NULL), GlobalRangeCount(0),
|
||||
InfoHolder(A, "info_string", DIEValueAllocator),
|
||||
InfoHolder(A, "info_string", DIEValueAllocator), HasCURanges(false),
|
||||
SkeletonHolder(A, "skel_string", DIEValueAllocator) {
|
||||
|
||||
DwarfInfoSectionSym = DwarfAbbrevSectionSym = DwarfStrSectionSym = 0;
|
||||
@ -209,10 +209,6 @@ DwarfDebug::DwarfDebug(AsmPrinter *A, Module *M)
|
||||
else
|
||||
HasDwarfPubSections = DwarfPubSections == Enable;
|
||||
|
||||
// For now only turn on CU ranges if we've explicitly asked for it
|
||||
// or we have -ffunction-sections enabled.
|
||||
HasCURanges = DwarfCURanges || TargetMachine::getFunctionSections();
|
||||
|
||||
DwarfVersion = DwarfVersionNumber
|
||||
? DwarfVersionNumber
|
||||
: getDwarfVersionFromModule(MMI->getModule());
|
||||
@ -1126,6 +1122,13 @@ void DwarfDebug::endSections() {
|
||||
// Insert a final terminator.
|
||||
SectionMap[Section].push_back(SymbolCU(NULL, Sym));
|
||||
}
|
||||
|
||||
// For now only turn on CU ranges if we've explicitly asked for it,
|
||||
// we have -ffunction-sections enabled, or we've emitted a function
|
||||
// into a unique section. At this point all sections should be finalized
|
||||
// except for dwarf sections.
|
||||
HasCURanges = DwarfCURanges || Asm->TM.debugUseUniqueSections() ||
|
||||
TargetMachine::getFunctionSections();
|
||||
}
|
||||
|
||||
// Emit all Dwarf sections that should come after the content.
|
||||
|
Reference in New Issue
Block a user