[llvm-commits] [poolalloc] r137559 - /poolalloc/trunk/include/poolalloc/Heuristic.h
Will Dietz
wdietz2 at illinois.edu
Sat Aug 13 12:02:44 PDT 2011
Author: wdietz2
Date: Sat Aug 13 14:02:44 2011
New Revision: 137559
URL: http://llvm.org/viewvc/llvm-project?rev=137559&view=rev
Log:
Switch Pass::ID's to references, the explicit pointer is unnecessary.
Modified:
poolalloc/trunk/include/poolalloc/Heuristic.h
Modified: poolalloc/trunk/include/poolalloc/Heuristic.h
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/include/poolalloc/Heuristic.h?rev=137559&r1=137558&r2=137559&view=diff
==============================================================================
--- poolalloc/trunk/include/poolalloc/Heuristic.h (original)
+++ poolalloc/trunk/include/poolalloc/Heuristic.h Sat Aug 13 14:02:44 2011
@@ -160,7 +160,7 @@
return this;
}
- AllNodesHeuristic (char * IDp = &ID): ModulePass (*IDp) { }
+ AllNodesHeuristic (char & IDp = ID): ModulePass (IDp) { }
virtual ~AllNodesHeuristic () {return;}
virtual bool runOnModule (Module & M);
virtual const char * getPassName () const {
@@ -211,7 +211,7 @@
return this;
}
- AllButUnreachableFromMemoryHeuristic (char * IDp = &ID) : ModulePass (*IDp) { }
+ AllButUnreachableFromMemoryHeuristic (char & IDp = ID) : ModulePass (IDp) { }
virtual ~AllButUnreachableFromMemoryHeuristic () {return;}
virtual bool runOnModule (Module & M);
@@ -246,7 +246,7 @@
}
- CyclicNodesHeuristic (char * IDp=&ID): ModulePass (*IDp) { }
+ CyclicNodesHeuristic (char & IDp=ID): ModulePass (IDp) { }
virtual ~CyclicNodesHeuristic () {return;}
virtual bool runOnModule (Module & M);
@@ -281,7 +281,7 @@
return this;
}
- SmartCoallesceNodesHeuristic (char * IDp = &ID) : ModulePass (*IDp) { }
+ SmartCoallesceNodesHeuristic (char & IDp = ID) : ModulePass (IDp) { }
virtual ~SmartCoallesceNodesHeuristic () {return;}
virtual bool runOnModule (Module & M);
@@ -323,8 +323,8 @@
return this;
}
- AllInOneGlobalPoolHeuristic(char * IDp = &ID) :
- ModulePass (*IDp), TheGlobalPD(0) {}
+ AllInOneGlobalPoolHeuristic(char & IDp = ID) :
+ ModulePass (IDp), TheGlobalPD(0) {}
virtual bool runOnModule (Module & M);
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
@@ -360,7 +360,7 @@
return this;
}
- OnlyOverheadHeuristic(char * IDp = &ID) : ModulePass (*IDp) {}
+ OnlyOverheadHeuristic(char & IDp = ID) : ModulePass (IDp) {}
virtual bool runOnModule (Module & M);
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
@@ -395,7 +395,7 @@
return this;
}
- NoNodesHeuristic(char * IDp = &ID) : ImmutablePass (*IDp) {}
+ NoNodesHeuristic(char & IDp = ID) : ImmutablePass (IDp) {}
virtual bool runOnModule (Module & M);
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
More information about the llvm-commits
mailing list