[llvm] r274649 - NFC changed names in FunctionImport

Piotr Padlewski via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 6 11:12:24 PDT 2016


Author: prazek
Date: Wed Jul  6 13:12:23 2016
New Revision: 274649

URL: http://llvm.org/viewvc/llvm-project?rev=274649&view=rev
Log:
NFC changed names in FunctionImport

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=274649&r1=274648&r2=274649&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/IPO/FunctionImport.cpp (original)
+++ llvm/trunk/lib/Transforms/IPO/FunctionImport.cpp Wed Jul  6 13:12:23 2016
@@ -581,20 +581,20 @@ bool FunctionImporter::importFunctions(
     auto &ImportGUIDs = FunctionsToImportPerModule->second;
     // Find the globals to import
     DenseSet<const GlobalValue *> GlobalsToImport;
-    for (auto &GV : *SrcModule) {
-      if (!GV.hasName())
+    for (Function &F : *SrcModule) {
+      if (!F.hasName())
         continue;
-      auto GUID = GV.getGUID();
+      auto GUID = F.getGUID();
       auto Import = ImportGUIDs.count(GUID);
       DEBUG(dbgs() << (Import ? "Is" : "Not") << " importing function " << GUID
-                   << " " << GV.getName() << " from "
+                   << " " << F.getName() << " from "
                    << SrcModule->getSourceFileName() << "\n");
       if (Import) {
-        GV.materialize();
-        GlobalsToImport.insert(&GV);
+        F.materialize();
+        GlobalsToImport.insert(&F);
       }
     }
-    for (auto &GV : SrcModule->globals()) {
+    for (GlobalVariable &GV : SrcModule->globals()) {
       if (!GV.hasName())
         continue;
       auto GUID = GV.getGUID();
@@ -607,20 +607,20 @@ bool FunctionImporter::importFunctions(
         GlobalsToImport.insert(&GV);
       }
     }
-    for (auto &GV : SrcModule->aliases()) {
-      if (!GV.hasName())
+    for (GlobalAlias &GA : SrcModule->aliases()) {
+      if (!GA.hasName())
         continue;
-      auto GUID = GV.getGUID();
+      auto GUID = GA.getGUID();
       auto Import = ImportGUIDs.count(GUID);
       DEBUG(dbgs() << (Import ? "Is" : "Not") << " importing alias " << GUID
-                   << " " << GV.getName() << " from "
+                   << " " << GA.getName() << " from "
                    << SrcModule->getSourceFileName() << "\n");
       if (Import) {
         // Alias can't point to "available_externally". However when we import
         // linkOnceODR the linkage does not change. So we import the alias
         // and aliasee only in this case. This has been handled by
         // computeImportForFunction()
-        GlobalObject *GO = GV.getBaseObject();
+        GlobalObject *GO = GA.getBaseObject();
         assert(GO->hasLinkOnceODRLinkage() &&
                "Unexpected alias to a non-linkonceODR in import list");
 #ifndef NDEBUG
@@ -631,8 +631,8 @@ bool FunctionImporter::importFunctions(
 #endif
         GO->materialize();
         GlobalsToImport.insert(GO);
-        GV.materialize();
-        GlobalsToImport.insert(&GV);
+        GA.materialize();
+        GlobalsToImport.insert(&GA);
       }
     }
 




More information about the llvm-commits mailing list