Remove the -generate-dwarf-cu-ranges flag.

Rewrite a couple of testcases to cover areas that would be normally
by turning it on into testcases that will follow the logic.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203968 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Eric Christopher
2014-03-14 20:53:43 +00:00
parent c75ec15881
commit 895ec9ed94
3 changed files with 17 additions and 23 deletions

View File

@@ -106,11 +106,6 @@ static cl::opt<unsigned>
DwarfVersionNumber("dwarf-version", cl::Hidden,
cl::desc("Generate DWARF for dwarf version."), cl::init(0));
static cl::opt<bool>
DwarfCURanges("generate-dwarf-cu-ranges", cl::Hidden,
cl::desc("Generate DW_AT_ranges for compile units"),
cl::init(false));
static const char *const DWARFGroupName = "DWARF Emission";
static const char *const DbgTimerName = "DWARF Debug Writer";
@@ -1067,13 +1062,12 @@ void DwarfDebug::endSections() {
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, we've emitted a function
// into a unique section, or we're using LTO. If we're using LTO then
// we can't know that any particular function in the module is correlated
// to a particular CU and so we need to be conservative. At this point all
// sections should be finalized except for dwarf sections.
HasCURanges = DwarfCURanges || UsedNonDefaultText || (CUMap.size() > 1) ||
// For now only turn on CU ranges if we have -ffunction-sections enabled,
// we've emitted a function into a unique section, or we're using LTO. If
// we're using LTO then we can't know that any particular function in the
// module is correlated to a particular CU and so we need to be conservative.
// At this point all sections should be finalized except for dwarf sections.
HasCURanges = UsedNonDefaultText || (CUMap.size() > 1) ||
TargetMachine::getFunctionSections();
}