'Pass' should now not be derived from by clients. Instead, they should derive
from ModulePass. Instead of implementing Pass::run, then should implement
ModulePass::runOnModule.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16436 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Analysis/IPA/Andersens.cpp b/lib/Analysis/IPA/Andersens.cpp
index 7901c91..9ade25e 100644
--- a/lib/Analysis/IPA/Andersens.cpp
+++ b/lib/Analysis/IPA/Andersens.cpp
@@ -75,7 +75,7 @@
Statistic<>
NumIndirectCallees("anders-aa", "Number of indirect callees found");
- class Andersens : public Pass, public AliasAnalysis,
+ class Andersens : public ModulePass, public AliasAnalysis,
private InstVisitor<Andersens> {
/// Node class - This class is used to represent a memory object in the
/// program, and is the primitive used to build the points-to graph.
@@ -193,7 +193,7 @@
};
public:
- bool run(Module &M) {
+ bool runOnModule(Module &M) {
InitializeAliasAnalysis(this);
IdentifyObjects(M);
CollectConstraints(M);
diff --git a/lib/Analysis/IPA/CallGraph.cpp b/lib/Analysis/IPA/CallGraph.cpp
index dbf5b9f..a6d2836 100644
--- a/lib/Analysis/IPA/CallGraph.cpp
+++ b/lib/Analysis/IPA/CallGraph.cpp
@@ -100,7 +100,7 @@
}
}
-bool CallGraph::run(Module &M) {
+bool CallGraph::runOnModule(Module &M) {
destroy();
Mod = &M;
diff --git a/lib/Analysis/IPA/CallGraphSCCPass.cpp b/lib/Analysis/IPA/CallGraphSCCPass.cpp
index f7d7ab1..8eb1c12 100644
--- a/lib/Analysis/IPA/CallGraphSCCPass.cpp
+++ b/lib/Analysis/IPA/CallGraphSCCPass.cpp
@@ -28,7 +28,7 @@
AU.addPreserved<CallGraph>();
}
-bool CallGraphSCCPass::run(Module &M) {
+bool CallGraphSCCPass::runOnModule(Module &M) {
CallGraph &CG = getAnalysis<CallGraph>();
bool Changed = doInitialization(CG);
for (scc_iterator<CallGraph*> I = scc_begin(&CG), E = scc_end(&CG);
diff --git a/lib/Analysis/IPA/FindUnsafePointerTypes.cpp b/lib/Analysis/IPA/FindUnsafePointerTypes.cpp
index 23ee99a..c0d0a62 100644
--- a/lib/Analysis/IPA/FindUnsafePointerTypes.cpp
+++ b/lib/Analysis/IPA/FindUnsafePointerTypes.cpp
@@ -58,7 +58,7 @@
}
-bool FindUnsafePointerTypes::run(Module &Mod) {
+bool FindUnsafePointerTypes::runOnModule(Module &Mod) {
for (Module::iterator FI = Mod.begin(), E = Mod.end();
FI != E; ++FI) {
const Function *F = FI; // We don't need/want write access
diff --git a/lib/Analysis/IPA/FindUsedTypes.cpp b/lib/Analysis/IPA/FindUsedTypes.cpp
index 1f127fe..cb6b05c 100644
--- a/lib/Analysis/IPA/FindUsedTypes.cpp
+++ b/lib/Analysis/IPA/FindUsedTypes.cpp
@@ -58,7 +58,7 @@
// run - This incorporates all types used by the specified module
//
-bool FindUsedTypes::run(Module &m) {
+bool FindUsedTypes::runOnModule(Module &m) {
UsedTypes.clear(); // reset if run multiple times...
// Loop over global variables, incorporating their types
diff --git a/lib/Analysis/IPA/GlobalsModRef.cpp b/lib/Analysis/IPA/GlobalsModRef.cpp
index c1f15ed..2c4ad4a 100644
--- a/lib/Analysis/IPA/GlobalsModRef.cpp
+++ b/lib/Analysis/IPA/GlobalsModRef.cpp
@@ -67,7 +67,7 @@
};
/// GlobalsModRef - The actual analysis pass.
- class GlobalsModRef : public Pass, public AliasAnalysis {
+ class GlobalsModRef : public ModulePass, public AliasAnalysis {
/// NonAddressTakenGlobals - The globals that do not have their addresses
/// taken.
std::set<GlobalValue*> NonAddressTakenGlobals;
@@ -77,7 +77,7 @@
std::map<Function*, FunctionRecord> FunctionInfo;
public:
- bool run(Module &M) {
+ bool runOnModule(Module &M) {
InitializeAliasAnalysis(this); // set up super class
AnalyzeGlobals(M); // find non-addr taken globals
AnalyzeCallGraph(getAnalysis<CallGraph>(), M); // Propagate on CG