mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 12:41:49 +01:00
[PM] Rename the 'Mod' member to the more idiomatic 'M'. No functionality
changed. llvm-svn: 195701
This commit is contained in:
parent
2284510f45
commit
157fe29e22
@ -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(); }
|
||||
|
@ -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<Function*>(F));
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user