Always treat DISubprogram reached by DIImportedEntity as needed.
authorTeresa Johnson <tejohnson@google.com>
Thu, 7 Jan 2016 00:06:27 +0000 (00:06 +0000)
committerTeresa Johnson <tejohnson@google.com>
Thu, 7 Jan 2016 00:06:27 +0000 (00:06 +0000)
commitc3c982a22ed59646e58a68e9a0069515cf2aa02e
tree13d8abab46ab1dbfd82d1ec3c34d442145f788f0
parent7fee368539d37afde20fb2122714f6aec58fdfc9
Always treat DISubprogram reached by DIImportedEntity as needed.

It is illegal to have a null entity in a DIImportedEntity, so
we must link in a DISubprogram metadata node referenced by one,
even if the associated function is not linked in or inlined anywhere.

Fixes PR26037.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257000 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Linker/IRMover.cpp
test/Linker/Inputs/pr26037.ll [new file with mode: 0644]
test/Linker/pr26037.ll [new file with mode: 0644]