diff options
author | Piotr Padlewski <piotr.padlewski@gmail.com> | 2016-07-06 18:12:23 +0000 |
---|---|---|
committer | Piotr Padlewski <piotr.padlewski@gmail.com> | 2016-07-06 18:12:23 +0000 |
commit | 1f685e0186ae86a2e580fa860de94a77dc64c089 (patch) | |
tree | 1cd55c12df24939c4d83b9c391864e3f4cb56477 /llvm/lib/Transforms/IPO/FunctionImport.cpp | |
parent | 8ff71575138f08a344067f29f992eb0126422a88 (diff) | |
download | bcm5719-llvm-1f685e0186ae86a2e580fa860de94a77dc64c089.tar.gz bcm5719-llvm-1f685e0186ae86a2e580fa860de94a77dc64c089.zip |
NFC changed names in FunctionImport
llvm-svn: 274649
Diffstat (limited to 'llvm/lib/Transforms/IPO/FunctionImport.cpp')
-rw-r--r-- | llvm/lib/Transforms/IPO/FunctionImport.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/llvm/lib/Transforms/IPO/FunctionImport.cpp b/llvm/lib/Transforms/IPO/FunctionImport.cpp index e22f4cbe34d..f756a2978d4 100644 --- a/llvm/lib/Transforms/IPO/FunctionImport.cpp +++ b/llvm/lib/Transforms/IPO/FunctionImport.cpp @@ -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); } } |