From 3a70d0083fbd9f289223197ca0fc7918d3d95531 Mon Sep 17 00:00:00 2001 From: Eric Christopher Date: Fri, 14 Mar 2014 20:53:43 +0000 Subject: 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. llvm-svn: 203968 --- llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) (limited to 'llvm/lib/CodeGen') diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index 1e3da83900c..ed5bcf3c7bd 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp @@ -106,11 +106,6 @@ static cl::opt DwarfVersionNumber("dwarf-version", cl::Hidden, cl::desc("Generate DWARF for dwarf version."), cl::init(0)); -static cl::opt -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(); } -- cgit v1.2.3