summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2014-12-01 18:42:18 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2014-12-01 18:42:18 +0000
commitdd42b533e96a267845ccb0911e337896a0dc204f (patch)
tree9914b4a0be044cd561cdacbef7af71fba9b2778f
parent4af55faa19ab59b0b8ba982f9dfa0059347eb034 (diff)
downloadbcm5719-llvm-dd42b533e96a267845ccb0911e337896a0dc204f.tar.gz
bcm5719-llvm-dd42b533e96a267845ccb0911e337896a0dc204f.zip
Drop SrcStructTypesSet. It is redundant.
At the only point in the code it is used, we haven't added any of the src types to DstStructTypesSet yet. llvm-svn: 223057
-rw-r--r--llvm/lib/Linker/LinkModules.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/llvm/lib/Linker/LinkModules.cpp b/llvm/lib/Linker/LinkModules.cpp
index 176df428cb6..78826c28c03 100644
--- a/llvm/lib/Linker/LinkModules.cpp
+++ b/llvm/lib/Linker/LinkModules.cpp
@@ -793,8 +793,6 @@ void ModuleLinker::computeTypeMapping() {
// it had the same type, it would have been renamed to "%foo.42 = { i32 }".
TypeFinder SrcStructTypes;
SrcStructTypes.run(*SrcM, true);
- SmallPtrSet<StructType*, 32> SrcStructTypesSet(SrcStructTypes.begin(),
- SrcStructTypes.end());
for (unsigned i = 0, e = SrcStructTypes.size(); i != e; ++i) {
StructType *ST = SrcStructTypes[i];
@@ -826,7 +824,7 @@ void ModuleLinker::computeTypeMapping() {
// we prefer to take the '%C' version. So we are then left with both
// '%C.1' and '%C' being used for the same types. This leads to some
// variables using one type and some using the other.
- if (!SrcStructTypesSet.count(DST) && TypeMap.DstStructTypesSet.count(DST))
+ if (TypeMap.DstStructTypesSet.count(DST))
TypeMap.addTypeMapping(DST, ST);
}
OpenPOWER on IntegriCloud