]> granicus.if.org Git - llvm/commit
Merging r287353:
authorTom Stellard <thomas.stellard@amd.com>
Fri, 25 Nov 2016 01:47:20 +0000 (01:47 +0000)
committerTom Stellard <thomas.stellard@amd.com>
Fri, 25 Nov 2016 01:47:20 +0000 (01:47 +0000)
commit1014f0f373fd7a8eac43c422480886b77e65e7c1
tree341edc586628ae9e109c5e903e0e76edb8b1f7d9
parent56938b6ec471a2724da88355f8a19d6829f10ef5
Merging r287353:

------------------------------------------------------------------------
r287353 | hans | 2016-11-18 09:33:05 -0800 (Fri, 18 Nov 2016) | 12 lines

IRMover: Avoid accidentally mapping types from the destination module (PR30799)

During Module linking, it's possible for SrcM->getIdentifiedStructTypes();
to return types that are actually defined in the destination module
(DstM). Depending on how the bitcode file was read,
getIdentifiedStructTypes() might do a walk over all values, including
metadata nodes, looking for types. In my case, a debug info metadata
node was shared between the two modules, and it referred to a type
defined in the destination module (see test case).

Differential Revision: https://reviews.llvm.org/D26212

------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_39@287906 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Linker/IRMover.cpp
test/LTO/X86/Inputs/type-mapping-src.ll [new file with mode: 0644]
test/LTO/X86/type-mapping-bug.ll [new file with mode: 0644]