Fix a nasty bug in the type remapping stuff that I added that is breaking kc++ on
authorChris Lattner <sabre@nondot.org>
Tue, 20 Dec 2011 23:14:57 +0000 (23:14 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 20 Dec 2011 23:14:57 +0000 (23:14 +0000)
commit1a31f3b90c012b067f8509546e1e037051e6482d
tree34dac90a600612229631eb3ec484b47d030c525f
parentaee718beac4fada5914d773db38002d95cae5e0d
Fix a nasty bug in the type remapping stuff that I added that is breaking kc++ on
the build bot in some cases.  The basic issue happens when a source module contains
both a "%foo" type and a "%foo.42" type.  It will see the later one, check to see if
the destination module contains a "%foo" type, and it will return true... because
both the source and destination modules are in the same LLVMContext.  We don't want
to map source types to other source types, so don't do the remapping if the mapped
type came from the source module.

Unfortunately, I've been unable to reduce a decent testcase for this, kc++ is
pretty great that way.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147010 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Linker/LinkModules.cpp