From 0c9fcd2be82a9bb547f9b8a9e3be30e5b79ca255 Mon Sep 17 00:00:00 2001 From: Chandler Carruth Date: Tue, 26 Nov 2013 00:37:23 +0000 Subject: [PATCH] [PM] Rename the 'Mod' member to the more idiomatic 'M'. No functionality changed. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195701 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Analysis/CallGraph.h | 4 ++-- lib/Analysis/IPA/CallGraph.cpp | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/llvm/Analysis/CallGraph.h b/include/llvm/Analysis/CallGraph.h index ef62a59bef0..bd5157aa5a4 100644 --- a/include/llvm/Analysis/CallGraph.h +++ b/include/llvm/Analysis/CallGraph.h @@ -74,7 +74,7 @@ class CallGraphNode; /// /// The core call graph itself can also be updated to reflect changes to the IR. class CallGraph : public ModulePass { - Module *Mod; // The module this call graph represents + Module *M; typedef std::map FunctionMapTy; FunctionMapTy FunctionMap; // Map from a function to its node @@ -109,7 +109,7 @@ public: typedef FunctionMapTy::const_iterator const_iterator; /// \brief Returns the module the call graph corresponds to. - Module &getModule() const { return *Mod; } + Module &getModule() const { return *M; } inline iterator begin() { return FunctionMap.begin(); } inline iterator end() { return FunctionMap.end(); } diff --git a/lib/Analysis/IPA/CallGraph.cpp b/lib/Analysis/IPA/CallGraph.cpp index f042964c21d..d5a718bfbc8 100644 --- a/lib/Analysis/IPA/CallGraph.cpp +++ b/lib/Analysis/IPA/CallGraph.cpp @@ -67,7 +67,7 @@ void CallGraph::getAnalysisUsage(AnalysisUsage &AU) const { } bool CallGraph::runOnModule(Module &M) { - Mod = &M; + this->M = &M; ExternalCallingNode = getOrInsertFunction(0); assert(!CallsExternalNode); @@ -148,7 +148,7 @@ Function *CallGraph::removeFunctionFromModule(CallGraphNode *CGN) { delete CGN; // Delete the call graph node for this func FunctionMap.erase(F); // Remove the call graph node from the map - Mod->getFunctionList().remove(F); + M->getFunctionList().remove(F); return F; } @@ -174,7 +174,7 @@ CallGraphNode *CallGraph::getOrInsertFunction(const Function *F) { CallGraphNode *&CGN = FunctionMap[F]; if (CGN) return CGN; - assert((!F || F->getParent() == Mod) && "Function not in current module!"); + assert((!F || F->getParent() == M) && "Function not in current module!"); return CGN = new CallGraphNode(const_cast(F)); }