llvm.org GIT mirror llvm / 6389abd
Enable use of ranges for translation units in the presence of -ffunction-sections and update comments and TODOs about other places that we should enable this. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199263 91177308-0d34-0410-b5e6-96231b3b80d8 Eric Christopher 6 years ago
1 changed file(s) with 7 addition(s) and 5 deletion(s). Raw diff Collapse all Expand all
10491049 dwarf::DW_FORM_data8, ID);
10501050 }
10511051
1052 // If we've requested ranges and have them emit a DW_AT_ranges attribute
1053 // on the unit that will remain in the .o file, otherwise add a
1054 // DW_AT_low_pc.
1052 // If we have code split among multiple sections or we've requested
1053 // it then emit a DW_AT_ranges attribute on the unit that will remain
1054 // in the .o file, otherwise add a DW_AT_low_pc.
10551055 // FIXME: Also add a high pc if we can.
1056 // FIXME: We should use ranges if we have multiple compile units.
1056 // FIXME: We should use ranges if we have multiple compile units or
1057 // allow reordering of code ala .subsections_via_symbols in mach-o.
10571058 DwarfCompileUnit *U = SkCU ? SkCU : static_cast(TheU);
1058 if (DwarfCURanges && TheU->getRanges().size())
1059 if ((DwarfCURanges || TargetMachine::getFunctionSections()) &&
1060 TheU->getRanges().size())
10591061 addSectionLabel(Asm, U, U->getUnitDie(), dwarf::DW_AT_ranges,
10601062 Asm->GetTempSymbol("cu_ranges", U->getUniqueID()),
10611063 DwarfDebugRangeSectionSym);