[llvm] r264734 - [ThinLTO] Use new GlobalValue::getGUID helper (NFC)

Teresa Johnson via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 29 07:49:26 PDT 2016


Author: tejohnson
Date: Tue Mar 29 09:49:26 2016
New Revision: 264734

URL: http://llvm.org/viewvc/llvm-project?rev=264734&view=rev
Log:
[ThinLTO] Use new GlobalValue::getGUID helper (NFC)

This was already being used for functions and aliases, was missed when
handling global variables.

Modified:
    llvm/trunk/lib/Transforms/IPO/FunctionImport.cpp

Modified: llvm/trunk/lib/Transforms/IPO/FunctionImport.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/FunctionImport.cpp?rev=264734&r1=264733&r2=264734&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/IPO/FunctionImport.cpp (original)
+++ llvm/trunk/lib/Transforms/IPO/FunctionImport.cpp Tue Mar 29 09:49:26 2016
@@ -342,8 +342,7 @@ bool FunctionImporter::importFunctions(
     for (auto &GV : SrcModule->globals()) {
       if (!GV.hasName())
         continue;
-      auto GUID = Function::getGUID(Function::getGlobalIdentifier(
-          GV.getName(), GV.getLinkage(), SrcModule->getModuleIdentifier()));
+      auto GUID = GV.getGUID();
       if (ImportGUIDs.count(GUID)) {
         GV.materialize();
         GlobalsToImport.insert(&GV);




More information about the llvm-commits mailing list