[llvm-commits] CVS: llvm/include/llvm/PassAnalysisSupport.h
Dan Gohman
djg at cray.com
Mon May 14 07:22:06 PDT 2007
Changes in directory llvm/include/llvm:
PassAnalysisSupport.h updated: 1.30 -> 1.31
---
Log message:
Add a addRequiredTransitiveID member function, which is to
addRequiredTransitive as addRequiredID is to addRequired.
---
Diffs of the changes: (+8 -6)
PassAnalysisSupport.h | 14 ++++++++------
1 files changed, 8 insertions(+), 6 deletions(-)
Index: llvm/include/llvm/PassAnalysisSupport.h
diff -u llvm/include/llvm/PassAnalysisSupport.h:1.30 llvm/include/llvm/PassAnalysisSupport.h:1.31
--- llvm/include/llvm/PassAnalysisSupport.h:1.30 Mon Apr 16 15:56:24 2007
+++ llvm/include/llvm/PassAnalysisSupport.h Mon May 14 09:21:46 2007
@@ -44,24 +44,26 @@
// for a pass.
//
AnalysisUsage &addRequiredID(AnalysisID ID) {
+ assert(ID && "Pass class not registered!");
Required.push_back(ID);
return *this;
}
template<class PassClass>
AnalysisUsage &addRequired() {
- assert(Pass::getClassPassInfo<PassClass>() && "Pass class not registered!");
- Required.push_back(Pass::getClassPassInfo<PassClass>());
- return *this;
+ return addRequiredID(Pass::getClassPassInfo<PassClass>());
}
- template<class PassClass>
- AnalysisUsage &addRequiredTransitive() {
- AnalysisID ID = Pass::getClassPassInfo<PassClass>();
+ AnalysisUsage &addRequiredTransitiveID(AnalysisID ID) {
assert(ID && "Pass class not registered!");
Required.push_back(ID);
RequiredTransitive.push_back(ID);
return *this;
}
+ template<class PassClass>
+ AnalysisUsage &addRequiredTransitive() {
+ AnalysisID ID = Pass::getClassPassInfo<PassClass>();
+ return addRequiredTransitiveID(ID);
+ }
// addPreserved - Add the specified ID to the set of analyses preserved by
// this pass
More information about the llvm-commits
mailing list