Do not drop ImmutablePasses on the floor.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32386 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Devang Patel 2006-12-08 23:57:43 +00:00
parent 145e83dc12
commit c9a6293af7

View File

@ -394,15 +394,16 @@ public:
inline void addTopLevelPass(Pass *P) {
if (dynamic_cast<ImmutablePass *> (P)) {
if (ImmutablePass *IP = dynamic_cast<ImmutablePass *> (P)) {
// P is a immutable pass then it will be managed by this
// top level manager. Set up analysis resolver to connect them.
AnalysisResolver_New *AR = new AnalysisResolver_New(*this);
P->setResolver(AR);
}
addPass(P);
addImmutablePass(IP);
}
else
addPass(P);
}
/// add - Add a pass to the queue of passes to run. This passes
@ -498,15 +499,16 @@ public:
inline void addTopLevelPass(Pass *P) {
if (dynamic_cast<ImmutablePass *> (P)) {
if (ImmutablePass *IP = dynamic_cast<ImmutablePass *> (P)) {
// P is a immutable pass and it will be managed by this
// top level manager. Set up analysis resolver to connect them.
AnalysisResolver_New *AR = new AnalysisResolver_New(*this);
P->setResolver(AR);
addImmutablePass(IP);
}
addPass(P);
else
addPass(P);
}
private: