Revert "[ThinLTO] Ensure we always select the same function copy to import"
authorTeresa Johnson <tejohnson@google.com>
Sat, 14 Jul 2018 01:50:14 +0000 (01:50 +0000)
committerTeresa Johnson <tejohnson@google.com>
Sat, 14 Jul 2018 01:50:14 +0000 (01:50 +0000)
This reverts commit r337051.

llvm-svn: 337082

clang/lib/CodeGen/BackendUtil.cpp

index 226a27b..2a02b83 100644 (file)
@@ -1127,8 +1127,9 @@ static void runThinLTOBackend(ModuleSummaryIndex *CombinedIndex, Module *M,
     // e.g. record required linkage changes.
     if (Summary->modulePath() == M->getModuleIdentifier())
       continue;
-    // Add an entry to provoke importing by thinBackend.
-    ImportList[Summary->modulePath()].insert(GUID);
+    // Doesn't matter what value we plug in to the map, just needs an entry
+    // to provoke importing by thinBackend.
+    ImportList[Summary->modulePath()][GUID] = 1;
   }
 
   std::vector<std::unique_ptr<llvm::MemoryBuffer>> OwnedImports;