diff options
Diffstat (limited to 'llvm/lib/IR/Pass.cpp')
-rw-r--r-- | llvm/lib/IR/Pass.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/llvm/lib/IR/Pass.cpp b/llvm/lib/IR/Pass.cpp index 6e22c1d4641..a42945ef3ff 100644 --- a/llvm/lib/IR/Pass.cpp +++ b/llvm/lib/IR/Pass.cpp @@ -146,16 +146,13 @@ PassManagerType FunctionPass::getPotentialPassManagerType() const { return PMT_FunctionPassManager; } -bool FunctionPass::skipFunction(const Function &F) { - if (!F.getContext().getOptBisect().shouldRunPass(this, F)) { - setExecuted(false); +bool FunctionPass::skipFunction(const Function &F) const { + if (!F.getContext().getOptBisect().shouldRunPass(this, F)) return true; - } if (F.hasFnAttribute(Attribute::OptimizeNone)) { DEBUG(dbgs() << "Skipping pass '" << getPassName() << "' on function " << F.getName() << "\n"); - setExecuted(false); return true; } return false; |