diff options
author | Chris Lattner <sabre@nondot.org> | 2002-03-26 17:55:33 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2002-03-26 17:55:33 +0000 |
commit | e590ff260edbe2e521506a9621c2b936b629a2ea (patch) | |
tree | e9f8ef495f489cdc9d96abec9be9fcb7a83edc32 /lib/Analysis/IPA/CallGraph.cpp | |
parent | 0fc0c1d3e13beb5a38a65ba018de75252aa11492 (diff) |
change refs to Method to Function
Change references to MEthodArgument to FunctionArgument
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1989 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/IPA/CallGraph.cpp')
-rw-r--r-- | lib/Analysis/IPA/CallGraph.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/lib/Analysis/IPA/CallGraph.cpp b/lib/Analysis/IPA/CallGraph.cpp index 6a5cad4244..98dfbf7e26 100644 --- a/lib/Analysis/IPA/CallGraph.cpp +++ b/lib/Analysis/IPA/CallGraph.cpp @@ -40,7 +40,7 @@ #include "llvm/Analysis/CallGraph.h" #include "llvm/Module.h" -#include "llvm/Method.h" +#include "llvm/Function.h" #include "llvm/iOther.h" #include "llvm/iTerminators.h" #include "Support/STLExtras.h" @@ -52,18 +52,18 @@ AnalysisID CallGraph::ID(AnalysisID::create<CallGraph>()); // getNodeFor - Return the node for the specified method or create one if it // does not already exist. // -CallGraphNode *CallGraph::getNodeFor(Method *M) { - CallGraphNode *&CGN = MethodMap[M]; +CallGraphNode *CallGraph::getNodeFor(Function *F) { + CallGraphNode *&CGN = MethodMap[F]; if (CGN) return CGN; - assert((!M || M->getParent() == Mod) && "Method not in current module!"); - return CGN = new CallGraphNode(M); + assert((!F || F->getParent() == Mod) && "Function not in current module!"); + return CGN = new CallGraphNode(F); } // addToCallGraph - Add a method to the call graph, and link the node to all of // the methods that it calls. // -void CallGraph::addToCallGraph(Method *M) { +void CallGraph::addToCallGraph(Function *M) { CallGraphNode *Node = getNodeFor(M); // If this method has external linkage, @@ -94,7 +94,7 @@ void CallGraph::addToCallGraph(Method *M) { } // Look for an indirect method call... - for (Method::iterator BBI = M->begin(), BBE = M->end(); BBI != BBE; ++BBI) { + for (Function::iterator BBI = M->begin(), BBE = M->end(); BBI != BBE; ++BBI) { BasicBlock *BB = *BBI; for (BasicBlock::iterator II = BB->begin(), IE = BB->end(); II != IE; ++II){ Instruction *I = *II; @@ -161,7 +161,7 @@ void WriteToOutput(const CallGraph &CG, std::ostream &o) { // Methods to keep a call graph up to date with a method that has been // modified // -void CallGraph::addMethodToModule(Method *Meth) { +void CallGraph::addMethodToModule(Function *Meth) { assert(0 && "not implemented"); abort(); } @@ -172,14 +172,14 @@ void CallGraph::addMethodToModule(Method *Meth) { // methods (ie, there are no edges in it's CGN). The easiest way to do this // is to dropAllReferences before calling this. // -Method *CallGraph::removeMethodFromModule(CallGraphNode *CGN) { +Function *CallGraph::removeMethodFromModule(CallGraphNode *CGN) { assert(CGN->CalledMethods.empty() && "Cannot remove method from call graph" " if it references other methods!"); - Method *M = CGN->getMethod(); // Get the method for the call graph node - delete CGN; // Delete the call graph node for this method - MethodMap.erase(M); // Remove the call graph node from the map + Function *M = CGN->getMethod(); // Get the function for the call graph node + delete CGN; // Delete the call graph node for this func + MethodMap.erase(M); // Remove the call graph node from the map - Mod->getMethodList().remove(M); + Mod->getFunctionList().remove(M); return M; } |