mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-12 14:20:33 +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:
parent
145e83dc12
commit
c9a6293af7
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user