mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-14 15:28:20 +00:00
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:
@@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user