OSDN Git Service

DebugInfo: Assert that any CU for which debug_loc lists are emitted, has at least...
authorDavid Blaikie <dblaikie@gmail.com>
Wed, 6 Aug 2014 00:21:25 +0000 (00:21 +0000)
committerDavid Blaikie <dblaikie@gmail.com>
Wed, 6 Aug 2014 00:21:25 +0000 (00:21 +0000)
commit8480beefd0ef04707663a7d9e8db852967988695
treef0f24576f9d56962b530e84ff3e69ffaa65d3acd
parent406658c31b0061b5fd7138a4a2911eaa94c37647
DebugInfo: Assert that any CU for which debug_loc lists are emitted, has at least one range.

This was coming in weird debug info that had variables (and hence
debug_locs) but was in GMLT mode (because it was missing the 13th field
of the compile_unit metadata) so no ranges were constructed. We should
always have at least one range for any CU with a debug_loc in it -
because the range should cover the debug_loc.

The assertion just ensures that the "!= 1" range case inside the
subsequent loop doesn't get entered for the case where there are no
ranges at all, which should never reach here in the first place.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214939 91177308-0d34-0410-b5e6-96231b3b80d8
37 files changed:
lib/CodeGen/AsmPrinter/DwarfDebug.cpp
test/CodeGen/ARM/2010-08-04-StackVariable.ll
test/CodeGen/ARM/debug-info-arg.ll
test/CodeGen/ARM/debug-info-blocks.ll
test/CodeGen/ARM/debug-info-branch-folding.ll
test/CodeGen/ARM/debug-info-d16-reg.ll
test/CodeGen/ARM/debug-info-qreg.ll
test/CodeGen/ARM/debug-info-s16-reg.ll
test/CodeGen/Hexagon/hwloop-dbg.ll
test/CodeGen/X86/2010-05-25-DotDebugLoc.ll
test/CodeGen/X86/2010-05-28-Crash.ll
test/CodeGen/X86/2010-08-04-StackVariable.ll
test/CodeGen/X86/2011-01-24-DbgValue-Before-Use.ll
test/CodeGen/X86/MachineSink-DbgValue.ll
test/CodeGen/X86/stack-protector-dbginfo.ll
test/DebugInfo/ARM/PR16736.ll
test/DebugInfo/X86/DW_AT_location-reference.ll
test/DebugInfo/X86/arguments.ll
test/DebugInfo/X86/block-capture.ll
test/DebugInfo/X86/dbg-const.ll
test/DebugInfo/X86/dbg-declare-arg.ll
test/DebugInfo/X86/dbg-value-dag-combine.ll
test/DebugInfo/X86/dbg-value-inlined-parameter.ll
test/DebugInfo/X86/dbg-value-isel.ll
test/DebugInfo/X86/dbg-value-terminator.ll
test/DebugInfo/X86/dbg_value_direct.ll
test/DebugInfo/X86/debug-info-blocks.ll
test/DebugInfo/X86/dwarf-aranges-no-dwarf-labels.ll
test/DebugInfo/X86/misched-dbg-value.ll
test/DebugInfo/X86/op_deref.ll
test/DebugInfo/X86/parameters.ll
test/DebugInfo/X86/pieces-1.ll
test/DebugInfo/X86/subreg.ll
test/DebugInfo/X86/subregisters.ll
test/DebugInfo/X86/vla.ll
test/DebugInfo/inlined-arguments.ll
test/DebugInfo/two-cus-from-same-file.ll