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,14 +394,15 @@ public:
inline void addTopLevelPass(Pass *P) { 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 // P is a immutable pass then it will be managed by this
// top level manager. Set up analysis resolver to connect them. // top level manager. Set up analysis resolver to connect them.
AnalysisResolver_New *AR = new AnalysisResolver_New(*this); AnalysisResolver_New *AR = new AnalysisResolver_New(*this);
P->setResolver(AR); P->setResolver(AR);
addImmutablePass(IP);
} }
else
addPass(P); addPass(P);
} }
@@ -498,14 +499,15 @@ public:
inline void addTopLevelPass(Pass *P) { 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 // P is a immutable pass and it will be managed by this
// top level manager. Set up analysis resolver to connect them. // top level manager. Set up analysis resolver to connect them.
AnalysisResolver_New *AR = new AnalysisResolver_New(*this); AnalysisResolver_New *AR = new AnalysisResolver_New(*this);
P->setResolver(AR); P->setResolver(AR);
addImmutablePass(IP);
} }
else
addPass(P); addPass(P);
} }