[ThinLTO] Handle previously imported and promoted locals in module linker
authorTeresa Johnson <tejohnson@google.com>
Tue, 24 Nov 2015 19:46:58 +0000 (19:46 +0000)
committerTeresa Johnson <tejohnson@google.com>
Tue, 24 Nov 2015 19:46:58 +0000 (19:46 +0000)
commitf3b9cb324edf1414d48248042e5b0b882a60188d
treeeb6b0fe11741c3b5709b946ec8aefb7638b0c05c
parente8ec005f39d55b58da0148ac1f718c097433a7b2
[ThinLTO] Handle previously imported and promoted locals in module linker

The new function import pass exposed an issue when we import references
to local values on multiple importing passes. They are renamed on each
import pass, and we need to ensure that the already promoted and renamed
references existing in the dest module are correctly identified and
updated so that they aren't spuriously renamed again (due to a perceived
conflict with the newly linked reference).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254009 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Linker/LinkModules.cpp
test/Transforms/FunctionImport/funcimport.ll