Skip to content
Snippets Groups Projects
Commit 7b464618 authored by Bill Wendling's avatar Bill Wendling
Browse files

The code that cleans up multiple, isomorphic types has a subtle error that

manifests itself when building LLVM with LTO.
<rdar://problem/10913281>

llvm-svn: 151576
parent 15a7b8e2
No related branches found
No related tags found
No related merge requests found
...@@ -580,7 +580,11 @@ void ModuleLinker::computeTypeMapping() { ...@@ -580,7 +580,11 @@ void ModuleLinker::computeTypeMapping() {
if (GlobalValue *DGV = getLinkedToGlobal(I)) if (GlobalValue *DGV = getLinkedToGlobal(I))
TypeMap.addTypeMapping(DGV->getType(), I->getType()); TypeMap.addTypeMapping(DGV->getType(), I->getType());
} }
#if 0
// FIXME: This doesn't play well with LTO. We cannot compile LLVM with this
// enabled. <rdar://problem/10913281>.
// Incorporate types by name, scanning all the types in the source module. // Incorporate types by name, scanning all the types in the source module.
// At this point, the destination module may have a type "%foo = { i32 }" for // At this point, the destination module may have a type "%foo = { i32 }" for
// example. When the source module got loaded into the same LLVMContext, if // example. When the source module got loaded into the same LLVMContext, if
...@@ -610,8 +614,8 @@ void ModuleLinker::computeTypeMapping() { ...@@ -610,8 +614,8 @@ void ModuleLinker::computeTypeMapping() {
if (!SrcStructTypesSet.count(DST)) if (!SrcStructTypesSet.count(DST))
TypeMap.addTypeMapping(DST, ST); TypeMap.addTypeMapping(DST, ST);
} }
#endif
// Don't bother incorporating aliases, they aren't generally typed well. // Don't bother incorporating aliases, they aren't generally typed well.
// Now that we have discovered all of the type equivalences, get a body for // Now that we have discovered all of the type equivalences, get a body for
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment