summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Linker
diff options
context:
space:
mode:
authorChad Rosier <mcrosier@apple.com>2011-12-17 22:19:53 +0000
committerChad Rosier <mcrosier@apple.com>2011-12-17 22:19:53 +0000
commit5e5bee4c529d7c15f0f3b1cd33167cc9a5f7512d (patch)
tree1e7b48dab8e46fc7ab2d512885593c215578a194 /llvm/lib/Linker
parent7cf80e3850d421a7dd57242351cf33ec0b8d39d9 (diff)
downloadbcm5719-llvm-5e5bee4c529d7c15f0f3b1cd33167cc9a5f7512d.tar.gz
bcm5719-llvm-5e5bee4c529d7c15f0f3b1cd33167cc9a5f7512d.zip
Revert 146728 as it's causing failures on some of the external bots as well as
internal nightly testers. Original commit message: By popular demand, link up types by name if they are isomorphic and one is an autorenamed version of the other. This makes the IR easier to read, because we don't end up with random renamed versions of the types after LTO'ing a large app. llvm-svn: 146838
Diffstat (limited to 'llvm/lib/Linker')
-rw-r--r--llvm/lib/Linker/LinkModules.cpp25
1 files changed, 0 insertions, 25 deletions
diff --git a/llvm/lib/Linker/LinkModules.cpp b/llvm/lib/Linker/LinkModules.cpp
index c53b2067a29..ab099bbfaf8 100644
--- a/llvm/lib/Linker/LinkModules.cpp
+++ b/llvm/lib/Linker/LinkModules.cpp
@@ -543,31 +543,6 @@ void ModuleLinker::computeTypeMapping() {
TypeMap.addTypeMapping(DGV->getType(), I->getType());
}
- // 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
- // example. When the source module got loaded into the same LLVMContext, if
- // it had the same type, it would have been renamed to "%foo.42 = { i32 }".
- // Though it isn't required for correctness, attempt to link these up to clean
- // up the IR.
- std::vector<StructType*> SrcStructTypes;
- SrcM->findUsedStructTypes(SrcStructTypes);
-
- for (unsigned i = 0, e = SrcStructTypes.size(); i != e; ++i) {
- StructType *ST = SrcStructTypes[i];
- if (!ST->hasName()) continue;
-
- // Check to see if there is a dot in the name followed by a digit.
- size_t DotPos = ST->getName().rfind('.');
- if (DotPos == 0 || DotPos == StringRef::npos ||
- ST->getName().back() == '.' || !isdigit(ST->getName()[DotPos+1]))
- continue;
-
- // Check to see if the destination module has a struct with the prefix name.
- if (StructType *DST = DstM->getTypeByName(ST->getName().substr(0, DotPos)))
- TypeMap.addTypeMapping(DST, ST);
- }
-
-
// 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
OpenPOWER on IntegriCloud