summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/AddressPool.h
diff options
context:
space:
mode:
authorGeorge Rimar <grimar@accesssoftek.com>2018-09-20 09:17:36 +0000
committerGeorge Rimar <grimar@accesssoftek.com>2018-09-20 09:17:36 +0000
commit425f75172f0306d319f644565c607777e1839c28 (patch)
tree400a8e1037a70078c8a7350c58b6304ab5170f40 /llvm/lib/CodeGen/AsmPrinter/AddressPool.h
parent26ba928214273cba2d1fb951bd395e6fa74896bb (diff)
downloadbcm5719-llvm-425f75172f0306d319f644565c607777e1839c28.tar.gz
bcm5719-llvm-425f75172f0306d319f644565c607777e1839c28.zip
[DWARF] - Emit the correct value for DW_AT_addr_base.
Currently, we emit DW_AT_addr_base that points to the beginning of the .debug_addr section. That is not correct for the DWARF5 case because address table contains the header and the attribute should point to the first entry following the header. This is currently the reason why LLDB does not work with such executables correctly. Patch fixes the issue. Differential revision: https://reviews.llvm.org/D52168 llvm-svn: 342635
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/AddressPool.h')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/AddressPool.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/AddressPool.h b/llvm/lib/CodeGen/AsmPrinter/AddressPool.h
index d5008fab556..2209c7eb50e 100644
--- a/llvm/lib/CodeGen/AsmPrinter/AddressPool.h
+++ b/llvm/lib/CodeGen/AsmPrinter/AddressPool.h
@@ -51,8 +51,14 @@ public:
void resetUsedFlag() { HasBeenUsed = false; }
+ MCSymbol *getLabel() { return AddressTableBaseSym; }
+ void setLabel(MCSymbol *Sym) { AddressTableBaseSym = Sym; }
+
private:
void emitHeader(AsmPrinter &Asm, MCSection *Section);
+
+ /// Symbol designates the start of the contribution to the address table.
+ MCSymbol *AddressTableBaseSym = nullptr;
};
} // end namespace llvm
OpenPOWER on IntegriCloud