From 85bd3978ae4e1c16fa8fa4bc27d0393d1d2265ea Mon Sep 17 00:00:00 2001 From: Evandro Menezes Date: Thu, 4 Apr 2019 22:40:06 +0000 Subject: [IR] Refactor attribute methods in Function class (NFC) Rename the functions that query the optimization kind attributes. Differential revision: https://reviews.llvm.org/D60287 llvm-svn: 357731 --- llvm/lib/IR/Pass.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'llvm/lib/IR/Pass.cpp') diff --git a/llvm/lib/IR/Pass.cpp b/llvm/lib/IR/Pass.cpp index f7815584fc4..699a7e17c0c 100644 --- a/llvm/lib/IR/Pass.cpp +++ b/llvm/lib/IR/Pass.cpp @@ -168,7 +168,7 @@ bool FunctionPass::skipFunction(const Function &F) const { if (Gate.isEnabled() && !Gate.shouldRunPass(this, getDescription(F))) return true; - if (F.optForNone()) { + if (F.hasOptNone()) { LLVM_DEBUG(dbgs() << "Skipping pass '" << getPassName() << "' on function " << F.getName() << "\n"); return true; @@ -207,7 +207,7 @@ bool BasicBlockPass::skipBasicBlock(const BasicBlock &BB) const { OptPassGate &Gate = F->getContext().getOptPassGate(); if (Gate.isEnabled() && !Gate.shouldRunPass(this, getDescription(BB))) return true; - if (F->optForNone()) { + if (F->hasOptNone()) { // Report this only once per function. if (&BB == &F->getEntryBlock()) LLVM_DEBUG(dbgs() << "Skipping pass '" << getPassName() -- cgit v1.2.3