mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-13 04:38:24 +00:00
elimiante the dynamic_cast's from opt.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94160 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -479,16 +479,23 @@ int main(int argc, char **argv) {
|
||||
addPass(Passes, P);
|
||||
|
||||
if (AnalyzeOnly) {
|
||||
if (dynamic_cast<BasicBlockPass*>(P))
|
||||
switch (P->getPassKind()) {
|
||||
case PT_BasicBlock:
|
||||
Passes.add(new BasicBlockPassPrinter(PassInf));
|
||||
else if (dynamic_cast<LoopPass*>(P))
|
||||
break;
|
||||
case PT_Loop:
|
||||
Passes.add(new LoopPassPrinter(PassInf));
|
||||
else if (dynamic_cast<FunctionPass*>(P))
|
||||
break;
|
||||
case PT_Function:
|
||||
Passes.add(new FunctionPassPrinter(PassInf));
|
||||
else if (dynamic_cast<CallGraphSCCPass*>(P))
|
||||
break;
|
||||
case PT_CallGraphSCC:
|
||||
Passes.add(new CallGraphSCCPassPrinter(PassInf));
|
||||
else
|
||||
break;
|
||||
default:
|
||||
Passes.add(new ModulePassPrinter(PassInf));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user