Do not emit a .debug_addr section if the DW_AT_addr_base is not set.
authorShubham Sandeep Rastogi <srastogi22@apple.com>
Wed, 19 Jul 2023 01:36:30 +0000 (18:36 -0700)
committerShubham Sandeep Rastogi <srastogi22@apple.com>
Sat, 22 Jul 2023 17:41:44 +0000 (10:41 -0700)
commitc5a45b2515e6d2c3d29e86ad41c9be5a88f172d4
tree877b4011ed41f655dde325b399d9779090619b86
parentfe48801feca0411f5ecfa37fe8802a2b3eece98f
Do not emit a .debug_addr section if the DW_AT_addr_base is not set.

If the DW_AT_addr_base is not set, dsymutil should not copy any addrx
attributes into the cloned DIE, which will result in no .debug_addr
section being emitted.

Differential Revision: https://reviews.llvm.org/D155666
llvm/lib/DWARFLinker/DWARFLinker.cpp
llvm/test/tools/dsymutil/Inputs/invalid.o [changed mode: 0755->0644]
llvm/test/tools/dsymutil/dwarf5-addrbase-broken.test [new file with mode: 0644]