summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Linker/LinkModules.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Linker/LinkModules.cpp')
-rw-r--r--llvm/lib/Linker/LinkModules.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/llvm/lib/Linker/LinkModules.cpp b/llvm/lib/Linker/LinkModules.cpp
index ebb790201fd..ecfb9431974 100644
--- a/llvm/lib/Linker/LinkModules.cpp
+++ b/llvm/lib/Linker/LinkModules.cpp
@@ -791,10 +791,8 @@ void ModuleLinker::computeTypeMapping() {
// 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 }".
- TypeFinder SrcStructTypes;
- SrcStructTypes.run(*SrcM, true);
-
- for (StructType *ST : SrcStructTypes) {
+ std::vector<StructType *> Types = SrcM->getIdentifiedStructTypes();
+ for (StructType *ST : Types) {
if (!ST->hasName())
continue;
OpenPOWER on IntegriCloud