summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2019-12-18 17:10:24 -0800
committerDavid Blaikie <dblaikie@gmail.com>2019-12-18 17:14:28 -0800
commitaaa5a5e7ff1aee632aae75311e7c044f710dd0a0 (patch)
tree4f6f3c2a0c3620ab805ef18807cc4b89db8e83c9 /llvm/lib/CodeGen
parent553a727f5f6407fb6db7ac2dae5f5b2a536d38fc (diff)
downloadbcm5719-llvm-aaa5a5e7ff1aee632aae75311e7c044f710dd0a0.tar.gz
bcm5719-llvm-aaa5a5e7ff1aee632aae75311e7c044f710dd0a0.zip
DebugInfo: Include DW_AT_base_addr even in gmlt with no inline functions
Since the address pool doesn't get populated in this case (due to the lack of inlining, no child DIEs are added to the CU - so no addresses are needed for the DIEs themselves) until the range list is emitted - at the time the attributes are added to the CU, the address pool is empty. So check whether the address pool will be used for the range lists & add an addr_base if that's the case.
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
index 6d62d4b3e69..0a0322f235e 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
@@ -1156,7 +1156,7 @@ void DwarfDebug::finalizeModuleInfo() {
// We don't keep track of which addresses are used in which CU so this
// is a bit pessimistic under LTO.
- if (!AddrPool.isEmpty() &&
+ if ((!AddrPool.isEmpty() || TheCU.hasRangeLists()) &&
(getDwarfVersion() >= 5 || HasSplitUnit))
U.addAddrTableBase();
OpenPOWER on IntegriCloud