summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2018-10-20 06:02:15 +0000
committerDavid Blaikie <dblaikie@gmail.com>2018-10-20 06:02:15 +0000
commit161dd3c186e480a4fd4ef8af395f5b0845ec9d5f (patch)
treea0a65f4cebe797cd411357e2c16995cc5f53db0d /llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
parent32e0a584f8ee86bca6714693dfdbb007d667119f (diff)
downloadbcm5719-llvm-161dd3c186e480a4fd4ef8af395f5b0845ec9d5f.tar.gz
bcm5719-llvm-161dd3c186e480a4fd4ef8af395f5b0845ec9d5f.zip
DebugInfo: Use debug_addr for non-dwo addresses in DWARF 5
Putting addresses in the address pool, even with non-fission, can reduce relocations - reusing the addresses from debug_info and debug_rnglists (the latter coming soon) llvm-svn: 344834
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
index 14e59c3df27..8a168f4845d 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
@@ -1652,6 +1652,8 @@ void DwarfUnit::addRnglistsBase() {
void DwarfUnit::addAddrTableBase() {
const TargetLoweringObjectFile &TLOF = Asm->getObjFileLowering();
MCSymbol *Label = DD->getAddressPool().getLabel();
- addSectionLabel(getUnitDie(), dwarf::DW_AT_GNU_addr_base, Label,
- TLOF.getDwarfAddrSection()->getBeginSymbol());
+ addSectionLabel(getUnitDie(),
+ getDwarfVersion() >= 5 ? dwarf::DW_AT_addr_base
+ : dwarf::DW_AT_GNU_addr_base,
+ Label, TLOF.getDwarfAddrSection()->getBeginSymbol());
}
OpenPOWER on IntegriCloud