From: Eric Christopher Date: Fri, 20 Dec 2013 04:34:22 +0000 (+0000) Subject: Ranges in the .debug_range section need to have begin and end labels, X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=d1946f7afe06924fdf7d3c9ad4b111aef8294ee1;p=oota-llvm.git 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 --- diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index 1c6d1a760d3..a30e8bbd954 100644 --- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp @@ -2938,14 +2938,12 @@ void DwarfDebug::emitDebugRanges() { RE = List.getRanges().end(); RI != RE; ++RI) { const RangeSpan &Range = *RI; - // We occasionally have ranges without begin/end labels. - // FIXME: Verify and fix. const MCSymbol *Begin = Range.getStart(); const MCSymbol *End = Range.getEnd(); - Begin ? Asm->OutStreamer.EmitSymbolValue(Begin, Size) - : Asm->OutStreamer.EmitIntValue(0, Size); - End ? Asm->OutStreamer.EmitSymbolValue(End, Size) - : Asm->OutStreamer.EmitIntValue(0, Size); + assert(Begin && "Range without a begin symbol?"); + assert(End && "Range without an end symbol?"); + Asm->OutStreamer.EmitSymbolValue(Begin, Size); + Asm->OutStreamer.EmitSymbolValue(End, Size); } // And terminate the list with two 0 values. @@ -2960,15 +2958,12 @@ void DwarfDebug::emitDebugRanges() { const SmallVectorImpl &Ranges = TheCU->getRanges(); for (uint32_t i = 0, e = Ranges.size(); i != e; ++i) { RangeSpan Range = Ranges[i]; - - // We occasionally have ranges without begin/end labels. - // FIXME: Verify and fix. const MCSymbol *Begin = Range.getStart(); const MCSymbol *End = Range.getEnd(); - Begin ? Asm->OutStreamer.EmitSymbolValue(Begin, Size) - : Asm->OutStreamer.EmitIntValue(0, Size); - End ? Asm->OutStreamer.EmitSymbolValue(End, Size) - : Asm->OutStreamer.EmitIntValue(0, Size); + assert(Begin && "Range without a begin symbol?"); + assert(End && "Range without an end symbol?"); + Asm->OutStreamer.EmitSymbolValue(Begin, Size); + Asm->OutStreamer.EmitSymbolValue(End, Size); } // And terminate the list with two 0 values. Asm->OutStreamer.EmitIntValue(0, Size);