DebugInfo: Include DW_AT_base_addr even in gmlt with no inline functions
authorDavid Blaikie <dblaikie@gmail.com>
Thu, 19 Dec 2019 01:10:24 +0000 (17:10 -0800)
committerDavid Blaikie <dblaikie@gmail.com>
Thu, 19 Dec 2019 01:14:28 +0000 (17:14 -0800)
commitaaa5a5e7ff1aee632aae75311e7c044f710dd0a0
tree4f6f3c2a0c3620ab805ef18807cc4b89db8e83c9
parent553a727f5f6407fb6db7ac2dae5f5b2a536d38fc
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.
llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
llvm/test/DebugInfo/X86/gmlt-empty-base-address.ll [new file with mode: 0644]