1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 03:33:20 +01:00

Add a addRequiredTransitiveID member function, which is to

addRequiredTransitive as addRequiredID is to addRequired.

llvm-svn: 37031
This commit is contained in:
Dan Gohman 2007-05-14 14:21:46 +00:00
parent 4c97ab3224
commit 1fba6fb9a8

View File

@ -44,24 +44,26 @@ public:
// 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