mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
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
This commit is contained in:
@@ -2199,6 +2199,7 @@ void DwarfDebug::emitDebugLoc() {
|
||||
for (const auto &DebugLoc : DotDebugLocEntries) {
|
||||
Asm->OutStreamer.EmitLabel(DebugLoc.Label);
|
||||
const DwarfCompileUnit *CU = DebugLoc.CU;
|
||||
assert(!CU->getRanges().empty());
|
||||
for (const auto &Entry : DebugLoc.List) {
|
||||
// Set up the range. This range is relative to the entry point of the
|
||||
// compile unit. This is a hard coded 0 for low_pc when we're emitting
|
||||
|
Reference in New Issue
Block a user