summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
diff options
context:
space:
mode:
authorEric Christopher <echristo@gmail.com>2014-02-27 07:44:45 +0000
committerEric Christopher <echristo@gmail.com>2014-02-27 07:44:45 +0000
commita9a1d276773a85c501213bfe3ed8dfe511d8a7bd (patch)
treed7f619afb2f587b3b7a51879dab204b23bb9aee1 /llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
parent4cced3e19bcf11809ecf9502794e1724a7e5a0db (diff)
downloadbcm5719-llvm-a9a1d276773a85c501213bfe3ed8dfe511d8a7bd.tar.gz
bcm5719-llvm-a9a1d276773a85c501213bfe3ed8dfe511d8a7bd.zip
Don't emit anything into the debug_ranges section if we aren't emitting
any ranges - this includes CU ranges where we were previously emitting an end list marker even if we didn't have a list. Testcase includes a test for line table only code emission as the problem was noticed while writing this test. llvm-svn: 202357
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
index ca060e2cc22..2eff17176b8 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
@@ -2873,7 +2873,7 @@ void DwarfDebug::emitDebugRanges() {
}
// Now emit a range for the CU itself.
- if (useCURanges()) {
+ if (useCURanges() && TheCU->getRanges().size()) {
Asm->OutStreamer.EmitLabel(
Asm->GetTempSymbol("cu_ranges", TheCU->getUniqueID()));
const SmallVectorImpl<RangeSpan> &Ranges = TheCU->getRanges();
OpenPOWER on IntegriCloud