diff options
author | Dan Gohman <gohman@apple.com> | 2010-05-07 01:08:53 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2010-05-07 01:08:53 +0000 |
commit | 7421ae48bf2c3d5a078d0b3047e7c879c3415320 (patch) | |
tree | 072007be064e7f9accf11458a49f8133b19d1c15 /llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp | |
parent | 586ff60cfc3deec561a4825152f3c6f2b3a928a4 (diff) | |
download | bcm5719-llvm-7421ae48bf2c3d5a078d0b3047e7c879c3415320.tar.gz bcm5719-llvm-7421ae48bf2c3d5a078d0b3047e7c879c3415320.zip |
Disable the new unknown-location code for now. It causes a major
increase in the debug line info section, and it's causing
regressions in a gdb testsuite.
llvm-svn: 103226
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 34 |
1 files changed, 20 insertions, 14 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index 4dc53059c1a..961b76e77e9 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp @@ -47,6 +47,10 @@ static cl::opt<bool> PrintDbgScope("print-dbgscope", cl::Hidden, static cl::opt<bool> DisableDebugInfoPrinting("disable-debug-info-print", cl::Hidden, cl::desc("Disable debug info printing")); +static cl::opt<bool> UnknownLocations("use-unknown-locations", cl::Hidden, + cl::desc("Make an absense of debug location information explicit."), + cl::init(false)); + namespace { const char *DWARFGroupName = "DWARF Emission"; const char *DbgTimerName = "DWARF Debug Writer"; @@ -2151,21 +2155,23 @@ void DwarfDebug::beginScope(const MachineInstr *MI) { // Check location. DebugLoc DL = MI->getDebugLoc(); if (DL.isUnknown()) { - // This instruction has no debug location. If the preceding instruction - // did, emit debug location information to indicate that the debug - // location is now unknown. - MCSymbol *Label = NULL; - if (DL == PrevInstLoc) - Label = PrevLabel; - else { - Label = recordSourceLine(DL.getLine(), DL.getCol(), 0); - PrevInstLoc = DL; - PrevLabel = Label; - } + if (UnknownLocations) { + // This instruction has no debug location. If the preceding instruction + // did, emit debug location information to indicate that the debug + // location is now unknown. + MCSymbol *Label = NULL; + if (DL == PrevInstLoc) + Label = PrevLabel; + else { + Label = recordSourceLine(DL.getLine(), DL.getCol(), 0); + PrevInstLoc = DL; + PrevLabel = Label; + } - // If this instruction begins a scope then note down corresponding label. - if (InsnsBeginScopeSet.count(MI) != 0) - LabelsBeforeInsn[MI] = Label; + // If this instruction begins a scope then note down corresponding label. + if (InsnsBeginScopeSet.count(MI) != 0) + LabelsBeforeInsn[MI] = Label; + } return; } |