summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorEric Christopher <echristo@gmail.com>2013-12-20 04:34:22 +0000
committerEric Christopher <echristo@gmail.com>2013-12-20 04:34:22 +0000
commit565ab11a3543086b1e6449e5b53878aef723fc9c (patch)
tree323c8ef15fd7557f0467bf2e5578372f75210e1c /llvm/lib/CodeGen
parent798998a47325eb9dc976942cc58e94875456e5a9 (diff)
downloadbcm5719-llvm-565ab11a3543086b1e6449e5b53878aef723fc9c.tar.gz
bcm5719-llvm-565ab11a3543086b1e6449e5b53878aef723fc9c.zip
Ranges in the .debug_range section need to have begin and end labels,
assert that this is so. llvm-svn: 197780
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp21
1 files changed, 8 insertions, 13 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
index 1c6d1a760d3..a30e8bbd954 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+++ b/llvm/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<RangeSpan> &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);
OpenPOWER on IntegriCloud