mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-03-03 14:31:10 +00:00
Ranges in the .debug_range section need to have begin and end labels,
assert that this is so. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197780 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
e9e7e2cc70
commit
d1946f7afe
@ -2938,14 +2938,12 @@ void DwarfDebug::emitDebugRanges() {
|
|||||||
RE = List.getRanges().end();
|
RE = List.getRanges().end();
|
||||||
RI != RE; ++RI) {
|
RI != RE; ++RI) {
|
||||||
const RangeSpan &Range = *RI;
|
const RangeSpan &Range = *RI;
|
||||||
// We occasionally have ranges without begin/end labels.
|
|
||||||
// FIXME: Verify and fix.
|
|
||||||
const MCSymbol *Begin = Range.getStart();
|
const MCSymbol *Begin = Range.getStart();
|
||||||
const MCSymbol *End = Range.getEnd();
|
const MCSymbol *End = Range.getEnd();
|
||||||
Begin ? Asm->OutStreamer.EmitSymbolValue(Begin, Size)
|
assert(Begin && "Range without a begin symbol?");
|
||||||
: Asm->OutStreamer.EmitIntValue(0, Size);
|
assert(End && "Range without an end symbol?");
|
||||||
End ? Asm->OutStreamer.EmitSymbolValue(End, Size)
|
Asm->OutStreamer.EmitSymbolValue(Begin, Size);
|
||||||
: Asm->OutStreamer.EmitIntValue(0, Size);
|
Asm->OutStreamer.EmitSymbolValue(End, Size);
|
||||||
}
|
}
|
||||||
|
|
||||||
// And terminate the list with two 0 values.
|
// And terminate the list with two 0 values.
|
||||||
@ -2960,15 +2958,12 @@ void DwarfDebug::emitDebugRanges() {
|
|||||||
const SmallVectorImpl<RangeSpan> &Ranges = TheCU->getRanges();
|
const SmallVectorImpl<RangeSpan> &Ranges = TheCU->getRanges();
|
||||||
for (uint32_t i = 0, e = Ranges.size(); i != e; ++i) {
|
for (uint32_t i = 0, e = Ranges.size(); i != e; ++i) {
|
||||||
RangeSpan Range = Ranges[i];
|
RangeSpan Range = Ranges[i];
|
||||||
|
|
||||||
// We occasionally have ranges without begin/end labels.
|
|
||||||
// FIXME: Verify and fix.
|
|
||||||
const MCSymbol *Begin = Range.getStart();
|
const MCSymbol *Begin = Range.getStart();
|
||||||
const MCSymbol *End = Range.getEnd();
|
const MCSymbol *End = Range.getEnd();
|
||||||
Begin ? Asm->OutStreamer.EmitSymbolValue(Begin, Size)
|
assert(Begin && "Range without a begin symbol?");
|
||||||
: Asm->OutStreamer.EmitIntValue(0, Size);
|
assert(End && "Range without an end symbol?");
|
||||||
End ? Asm->OutStreamer.EmitSymbolValue(End, Size)
|
Asm->OutStreamer.EmitSymbolValue(Begin, Size);
|
||||||
: Asm->OutStreamer.EmitIntValue(0, Size);
|
Asm->OutStreamer.EmitSymbolValue(End, Size);
|
||||||
}
|
}
|
||||||
// And terminate the list with two 0 values.
|
// And terminate the list with two 0 values.
|
||||||
Asm->OutStreamer.EmitIntValue(0, Size);
|
Asm->OutStreamer.EmitIntValue(0, Size);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user