forked from OSchip/llvm-project
Add a addRequiredTransitiveID member function, which is to
addRequiredTransitive as addRequiredID is to addRequired. llvm-svn: 37031
This commit is contained in:
parent
97beb5147f
commit
619bfa47e3
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue