summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2018-11-08 00:35:54 +0000
committerDavid Blaikie <dblaikie@gmail.com>2018-11-08 00:35:54 +0000
commitc8f7e6c1a9dd656c618fca015868112cfdf62c00 (patch)
tree2a839933376a2d9a8a7fca4471e80b3acbcf0200 /llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
parentc4cf775ae09bd9ed0c73180244c27cc6e702e524 (diff)
downloadbcm5719-llvm-c8f7e6c1a9dd656c618fca015868112cfdf62c00.tar.gz
bcm5719-llvm-c8f7e6c1a9dd656c618fca015868112cfdf62c00.zip
NFC: DebugInfo: Track the origin CU rather than just the base address for range lists
Turns out knowing more than just the base address might be useful - specifically a future change to respect a DICompileUnit flag for the use of base address specifiers in DWARF < 5. llvm-svn: 346380
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
index 2807734969a..070b8fe4ec1 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
@@ -2275,7 +2275,8 @@ static void emitRangeList(DwarfDebug &DD, AsmPrinter *Asm,
for (const RangeSpan &Range : List.getRanges())
SectionRanges[&Range.getStart()->getSection()].push_back(&Range);
- const MCSymbol *CUBase = List.getBaseAddress();
+ const DwarfCompileUnit &CU = List.getCU();
+ const MCSymbol *CUBase = CU.getBaseAddress();
bool BaseIsSet = false;
for (const auto &P : SectionRanges) {
// Don't bother with a base address entry if there's only one range in
OpenPOWER on IntegriCloud