dsymutil: Avoid pruning non-type forward declarations inside DW_TAG_module
authorAdrian Prantl <aprantl@apple.com>
Thu, 30 Aug 2018 21:21:16 +0000 (21:21 +0000)
committerAdrian Prantl <aprantl@apple.com>
Thu, 30 Aug 2018 21:21:16 +0000 (21:21 +0000)
commitbdffea12d0be98efbf6d6ec4dcba3267b8aa7dec
treed1ac2486e33f385cc3a609444639aacc4c776ae7
parenta1f57030c624f39d9e97008635e1d9efe67962bd
dsymutil: Avoid pruning non-type forward declarations inside DW_TAG_module
forward declarations.

Especially with template instantiations, there are legitimate reasons
why for declarations might be emitted into a DW_TAG_module skeleton /
forward-declaration sub-tree, that are not forward declarations in the
sense of that there is a more complete definition over in a .pcm file.

The example in the testcase is a constant DW_TAG_member of a
DW_TAG_class template instatiation.

rdar://problem/43623196

llvm-svn: 341123
llvm/test/tools/dsymutil/Inputs/modules-pruning/1.o [new file with mode: 0644]
llvm/test/tools/dsymutil/Inputs/modules-pruning/Outer.pcm [new file with mode: 0644]
llvm/test/tools/dsymutil/X86/modules-pruning.cpp [new file with mode: 0644]
llvm/tools/dsymutil/DwarfLinker.cpp