summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r--llvm/lib/Transforms/IPO/FunctionImport.cpp28
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);
}
}
OpenPOWER on IntegriCloud