diff options
author | David Blaikie <dblaikie@gmail.com> | 2018-11-08 00:35:54 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2018-11-08 00:35:54 +0000 |
commit | c8f7e6c1a9dd656c618fca015868112cfdf62c00 (patch) | |
tree | 2a839933376a2d9a8a7fca4471e80b3acbcf0200 /llvm/lib/CodeGen/AsmPrinter/DwarfFile.h | |
parent | c4cf775ae09bd9ed0c73180244c27cc6e702e524 (diff) | |
download | bcm5719-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/DwarfFile.h')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DwarfFile.h | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfFile.h b/llvm/lib/CodeGen/AsmPrinter/DwarfFile.h index 1e5c99e26eb..51acca8c1e5 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfFile.h +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfFile.h @@ -48,17 +48,16 @@ class RangeSpanList { private: // Index for locating within the debug_range section this particular span. MCSymbol *RangeSym; - const MCSymbol **CUBaseAddress; + const DwarfCompileUnit *CU; // List of ranges. SmallVector<RangeSpan, 2> Ranges; public: - RangeSpanList(MCSymbol *Sym, const MCSymbol *&CUBaseAddress, + RangeSpanList(MCSymbol *Sym, const DwarfCompileUnit &CU, SmallVector<RangeSpan, 2> Ranges) - : RangeSym(Sym), CUBaseAddress(&CUBaseAddress), - Ranges(std::move(Ranges)) {} + : RangeSym(Sym), CU(&CU), Ranges(std::move(Ranges)) {} MCSymbol *getSym() const { return RangeSym; } - const MCSymbol *&getBaseAddress() const { return *CUBaseAddress; } + const DwarfCompileUnit &getCU() const { return *CU; } const SmallVectorImpl<RangeSpan> &getRanges() const { return Ranges; } void addRange(RangeSpan Range) { Ranges.push_back(Range); } }; @@ -123,7 +122,7 @@ public: return CUs; } - std::pair<uint32_t, RangeSpanList *> addRange(const MCSymbol *&CUBaseAddress, + std::pair<uint32_t, RangeSpanList *> addRange(const DwarfCompileUnit &CU, SmallVector<RangeSpan, 2> R); /// getRangeLists - Get the vector of range lists. |