aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/AsmPrinter/DwarfFile.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/DwarfFile.cpp
parentc4cf775ae09bd9ed0c73180244c27cc6e702e524 (diff)
downloadllvm-c8f7e6c1a9dd656c618fca015868112cfdf62c00.zip
llvm-c8f7e6c1a9dd656c618fca015868112cfdf62c00.tar.gz
llvm-c8f7e6c1a9dd656c618fca015868112cfdf62c00.tar.bz2
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/DwarfFile.cpp')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfFile.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfFile.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfFile.cpp
index 1e5b7f1..4e410bb 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfFile.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfFile.cpp
@@ -111,9 +111,8 @@ void DwarfFile::addScopeLabel(LexicalScope *LS, DbgLabel *Label) {
}
std::pair<uint32_t, RangeSpanList *>
-DwarfFile::addRange(const MCSymbol *&CUBaseAddress,
- SmallVector<RangeSpan, 2> R) {
- CURangeLists.push_back(RangeSpanList(Asm->createTempSymbol("debug_ranges"),
- CUBaseAddress, std::move(R)));
+DwarfFile::addRange(const DwarfCompileUnit &CU, SmallVector<RangeSpan, 2> R) {
+ CURangeLists.push_back(
+ RangeSpanList(Asm->createTempSymbol("debug_ranges"), CU, std::move(R)));
return std::make_pair(CURangeLists.size() - 1, &CURangeLists.back());
}