r337051 - [ThinLTO] Ensure we always select the same function copy to import

Teresa Johnson via cfe-commits cfe-commits at lists.llvm.org
Fri Jul 13 14:35:58 PDT 2018


Author: tejohnson
Date: Fri Jul 13 14:35:58 2018
New Revision: 337051

URL: http://llvm.org/viewvc/llvm-project?rev=337051&view=rev
Log:
[ThinLTO] Ensure we always select the same function copy to import

Clang change to reflect the FunctionsToImportTy type change
in the llvm changes for D48670.

Modified:
    cfe/trunk/lib/CodeGen/BackendUtil.cpp

Modified: cfe/trunk/lib/CodeGen/BackendUtil.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/BackendUtil.cpp?rev=337051&r1=337050&r2=337051&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/BackendUtil.cpp (original)
+++ cfe/trunk/lib/CodeGen/BackendUtil.cpp Fri Jul 13 14:35:58 2018
@@ -1127,9 +1127,8 @@ static void runThinLTOBackend(ModuleSumm
     // 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;




More information about the cfe-commits mailing list