]> granicus.if.org Git - clang/commitdiff
[ThinLTO] Ensure we always select the same function copy to import
authorTeresa Johnson <tejohnson@google.com>
Fri, 13 Jul 2018 21:35:58 +0000 (21:35 +0000)
committerTeresa Johnson <tejohnson@google.com>
Fri, 13 Jul 2018 21:35:58 +0000 (21:35 +0000)
Clang change to reflect the FunctionsToImportTy type change
in the llvm changes for D48670.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@337051 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/BackendUtil.cpp

index 2a02b838d22ab963cc442a5d0226ad8a03ef1204..226a27b2161df76712f0e40552fb0d70bb3dcf3c 100644 (file)
@@ -1127,9 +1127,8 @@ static void runThinLTOBackend(ModuleSummaryIndex *CombinedIndex, Module *M,
     // e.g. record required linkage changes.
     if (Summary->modulePath() == M->getModuleIdentifier())
       continue;
-    // 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;
+    // Add an entry to provoke importing by thinBackend.
+    ImportList[Summary->modulePath()].insert(GUID);
   }
 
   std::vector<std::unique_ptr<llvm::MemoryBuffer>> OwnedImports;