[dsymutil] Discard useless location attributes.
authorFrederic Riss <friss@apple.com>
Fri, 11 Sep 2015 04:17:30 +0000 (04:17 +0000)
committerFrederic Riss <friss@apple.com>
Fri, 11 Sep 2015 04:17:30 +0000 (04:17 +0000)
commit5f69f9fb8178057f7678d95ae89dd0a09b446369
treed8b905734221f144b9673cf5ec2992e61e709098
parent5571e7771ecc1a41e046c226ea7bf052991a1486
[dsymutil] Discard useless location attributes.

When cloning the debug info for a function that hasn't been linked,
strip the DIEs from all location attributes that wouldn't contain any
meaningful information anyway.

This kind of situation can happen when a function got discarded by the
linker, but its debug information is still wanted in the final link
because it was marked as required as some other DIE dependency. The easiest
way to get into that situation is to have using directives. They get
linked unconditionally, but their targets might not always be present.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247386 91177308-0d34-0410-b5e6-96231b3b80d8
test/tools/dsymutil/Inputs/dead-stripped/1.o [new file with mode: 0644]
test/tools/dsymutil/X86/dead-stripped.cpp [new file with mode: 0644]
tools/dsymutil/DwarfLinker.cpp