[llvm] r195701 - [PM] Rename the 'Mod' member to the more idiomatic 'M'. No functionality

Chandler Carruth chandlerc at gmail.com
Mon Nov 25 16:37:23 PST 2013


Author: chandlerc
Date: Mon Nov 25 18:37:23 2013
New Revision: 195701

URL: http://llvm.org/viewvc/llvm-project?rev=195701&view=rev
Log:
[PM] Rename the 'Mod' member to the more idiomatic 'M'. No functionality
changed.

Modified:
    llvm/trunk/include/llvm/Analysis/CallGraph.h
    llvm/trunk/lib/Analysis/IPA/CallGraph.cpp

Modified: llvm/trunk/include/llvm/Analysis/CallGraph.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/CallGraph.h?rev=195701&r1=195700&r2=195701&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Analysis/CallGraph.h (original)
+++ llvm/trunk/include/llvm/Analysis/CallGraph.h Mon Nov 25 18:37:23 2013
@@ -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<const Function *, CallGraphNode *> 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();   }

Modified: llvm/trunk/lib/Analysis/IPA/CallGraph.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/IPA/CallGraph.cpp?rev=195701&r1=195700&r2=195701&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/IPA/CallGraph.cpp (original)
+++ llvm/trunk/lib/Analysis/IPA/CallGraph.cpp Mon Nov 25 18:37:23 2013
@@ -67,7 +67,7 @@ void CallGraph::getAnalysisUsage(Analysi
 }
 
 bool CallGraph::runOnModule(Module &M) {
-  Mod = &M;
+  this->M = &M;
 
   ExternalCallingNode = getOrInsertFunction(0);
   assert(!CallsExternalNode);
@@ -148,7 +148,7 @@ Function *CallGraph::removeFunctionFromM
   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::getOrInsertFun
   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<Function*>(F));
 }
 





More information about the llvm-commits mailing list