summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Linker
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2012-02-27 22:55:40 +0000
committerBill Wendling <isanbard@gmail.com>2012-02-27 22:55:40 +0000
commit688793da4ab0cb47b6b1770680286648481d8d65 (patch)
tree4e940a4041da7213933d4867e46109261e26a2a7 /llvm/lib/Linker
parent59b10db2bc2bef2a609a02c31bef8a2e79f899b1 (diff)
downloadbcm5719-llvm-688793da4ab0cb47b6b1770680286648481d8d65.tar.gz
bcm5719-llvm-688793da4ab0cb47b6b1770680286648481d8d65.zip
Don't use #if 0. Just remove until I can address this.
llvm-svn: 151580
Diffstat (limited to 'llvm/lib/Linker')
-rw-r--r--llvm/lib/Linker/LinkModules.cpp35
1 files changed, 0 insertions, 35 deletions
diff --git a/llvm/lib/Linker/LinkModules.cpp b/llvm/lib/Linker/LinkModules.cpp
index 59c9d7016bf..e87d6dd4168 100644
--- a/llvm/lib/Linker/LinkModules.cpp
+++ b/llvm/lib/Linker/LinkModules.cpp
@@ -581,41 +581,6 @@ void ModuleLinker::computeTypeMapping() {
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.
- // 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);
-
- SmallPtrSet<StructType*, 32> SrcStructTypesSet(SrcStructTypes.begin(),
- SrcStructTypes.end());
-
- 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)))
- // Don't use it if this actually came from the source module. They're in
- // the same LLVMContext after all.
- if (!SrcStructTypesSet.count(DST))
- TypeMap.addTypeMapping(DST, ST);
- }
-#endif
-
// 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