aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/AsmPrinter/DwarfFile.cpp
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2018-10-20 07:36:39 +0000
committerDavid Blaikie <dblaikie@gmail.com>2018-10-20 07:36:39 +0000
commitc4af8bf29fe0f413229f67909cfeb0a427afcd67 (patch)
treeded6eb43aa8d98b3981b7dfc7c82826d879b36fa /llvm/lib/CodeGen/AsmPrinter/DwarfFile.cpp
parent59ac20643335b69c8023fc62a95d5b59a73e604a (diff)
downloadllvm-c4af8bf29fe0f413229f67909cfeb0a427afcd67.zip
llvm-c4af8bf29fe0f413229f67909cfeb0a427afcd67.tar.gz
llvm-c4af8bf29fe0f413229f67909cfeb0a427afcd67.tar.bz2
DebugInfo: Use address pool forms in debug_rnglists
Save no relocations by reusing addresses from the address pool. llvm-svn: 344836
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DwarfFile.cpp')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfFile.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfFile.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfFile.cpp
index 0ab9ea8..1e5b7f1 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfFile.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfFile.cpp
@@ -109,3 +109,11 @@ void DwarfFile::addScopeLabel(LexicalScope *LS, DbgLabel *Label) {
SmallVectorImpl<DbgLabel *> &Labels = ScopeLabels[LS];
Labels.push_back(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)));
+ return std::make_pair(CURangeLists.size() - 1, &CURangeLists.back());
+}