Move copying of global initializers below the cloning of functions.
authorBill Wendling <isanbard@gmail.com>
Thu, 7 Nov 2013 20:14:51 +0000 (20:14 +0000)
committerBill Wendling <isanbard@gmail.com>
Thu, 7 Nov 2013 20:14:51 +0000 (20:14 +0000)
commit5d5f2c37d57276c9320dd2677d355d47fa4bc5c4
treec4c7a106e12d0d23238c5450cb84ec511c914fd5
parent9f471750fa6f34120d4758d5d14f54f899e34a54
Move copying of global initializers below the cloning of functions.

The BlockAddress doesn't have access to the correct basic blocks until the
functions have been cloned. This causes the BlockAddress to point to the old
values. Just wait until the functions have been cloned before copying the
initializers.
PR13163

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194218 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Linker/LinkModules.cpp
unittests/Linker/CMakeLists.txt [new file with mode: 0644]
unittests/Linker/LinkModulesTest.cpp [new file with mode: 0644]
unittests/Linker/Makefile [new file with mode: 0644]
unittests/Makefile