mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-04 01:11:44 +00:00
simplify code.
llvm-svn: 94159
This commit is contained in:
parent
2a96a8340e
commit
8b02bfe487
@ -476,21 +476,16 @@ int main(int argc, char **argv) {
|
||||
errs() << argv[0] << ": cannot create pass: "
|
||||
<< PassInf->getPassName() << "\n";
|
||||
if (P) {
|
||||
bool isBBPass = dynamic_cast<BasicBlockPass*>(P) != 0;
|
||||
bool isLPass = !isBBPass && dynamic_cast<LoopPass*>(P) != 0;
|
||||
bool isFPass = !isLPass && dynamic_cast<FunctionPass*>(P) != 0;
|
||||
bool isCGSCCPass = !isFPass && dynamic_cast<CallGraphSCCPass*>(P) != 0;
|
||||
|
||||
addPass(Passes, P);
|
||||
|
||||
if (AnalyzeOnly) {
|
||||
if (isBBPass)
|
||||
if (dynamic_cast<BasicBlockPass*>(P))
|
||||
Passes.add(new BasicBlockPassPrinter(PassInf));
|
||||
else if (isLPass)
|
||||
else if (dynamic_cast<LoopPass*>(P))
|
||||
Passes.add(new LoopPassPrinter(PassInf));
|
||||
else if (isFPass)
|
||||
else if (dynamic_cast<FunctionPass*>(P))
|
||||
Passes.add(new FunctionPassPrinter(PassInf));
|
||||
else if (isCGSCCPass)
|
||||
else if (dynamic_cast<CallGraphSCCPass*>(P))
|
||||
Passes.add(new CallGraphSCCPassPrinter(PassInf));
|
||||
else
|
||||
Passes.add(new ModulePassPrinter(PassInf));
|
||||
|
Loading…
Reference in New Issue
Block a user