summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2017-07-31 00:18:24 +0000
committerDavid Blaikie <dblaikie@gmail.com>2017-07-31 00:18:24 +0000
commit4dd663752dfaf2de2236d250e23d6e0a9c4c8968 (patch)
tree8d4a42a16ba91f91c5a21432df6451f03049bbf6 /llvm/lib/CodeGen/AsmPrinter
parent6301546b3dc566db774d7b3279ee2a6e7c82a733 (diff)
downloadbcm5719-llvm-4dd663752dfaf2de2236d250e23d6e0a9c4c8968.tar.gz
bcm5719-llvm-4dd663752dfaf2de2236d250e23d6e0a9c4c8968.zip
DebugInfo: Fix r309526, ensure resetting base address selection entries are used
Missed the resetting base address selections when going from a base address version to zero base address for non-base-addressed entries. llvm-svn: 309529
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
index 0edf74db059..ea1a170c1c2 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
@@ -1873,6 +1873,7 @@ void DwarfDebug::emitDebugRanges() {
}
auto *CUBase = TheCU->getBaseAddress();
+ bool BaseIsSet = false;
for (const auto &P : MV) {
// Don't bother with a base address entry if there's only one range in
// this section in this range list - for example ranges for a CU will
@@ -1882,11 +1883,16 @@ void DwarfDebug::emitDebugRanges() {
// contrubutions.
auto *Base = CUBase;
if (!Base && P.second.size() > 1) {
+ BaseIsSet = true;
// FIXME/use care: This may not be a useful base address if it's not
// the lowest address/range in this object.
Base = P.second.front()->getStart();
Asm->OutStreamer->EmitIntValue(-1, Size);
Asm->OutStreamer->EmitSymbolValue(Base, Size);
+ } else if (BaseIsSet) {
+ BaseIsSet = false;
+ Asm->OutStreamer->EmitIntValue(-1, Size);
+ Asm->OutStreamer->EmitIntValue(0, Size);
}
for (const auto *RS : P.second) {
OpenPOWER on IntegriCloud