summaryrefslogtreecommitdiffstats
path: root/gnu/llvm/lib/IR/Pass.cpp
diff options
context:
space:
mode:
authorpatrick <patrick@openbsd.org>2019-01-27 16:42:12 +0000
committerpatrick <patrick@openbsd.org>2019-01-27 16:42:12 +0000
commitb773203fb58f3ef282fb69c832d8710cab5bc82d (patch)
treee75913f147570fbd75169647b144df85b88a038c /gnu/llvm/lib/IR/Pass.cpp
parenttweak errno in previous (diff)
downloadwireguard-openbsd-b773203fb58f3ef282fb69c832d8710cab5bc82d.tar.xz
wireguard-openbsd-b773203fb58f3ef282fb69c832d8710cab5bc82d.zip
Import LLVM 7.0.1 release including clang, lld and lldb.
Diffstat (limited to 'gnu/llvm/lib/IR/Pass.cpp')
-rw-r--r--gnu/llvm/lib/IR/Pass.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/gnu/llvm/lib/IR/Pass.cpp b/gnu/llvm/lib/IR/Pass.cpp
index 5e0b59476c4..a1dc1788249 100644
--- a/gnu/llvm/lib/IR/Pass.cpp
+++ b/gnu/llvm/lib/IR/Pass.cpp
@@ -14,6 +14,7 @@
//===----------------------------------------------------------------------===//
#include "llvm/Pass.h"
+#include "llvm/Config/llvm-config.h"
#include "llvm/IR/Attributes.h"
#include "llvm/IR/BasicBlock.h"
#include "llvm/IR/Function.h"
@@ -56,7 +57,7 @@ PassManagerType ModulePass::getPotentialPassManagerType() const {
}
bool ModulePass::skipModule(Module &M) const {
- return !M.getContext().getOptBisect().shouldRunPass(this, M);
+ return !M.getContext().getOptPassGate().shouldRunPass(this, M);
}
bool Pass::mustPreserveAnalysisID(char &AID) const {
@@ -155,12 +156,12 @@ PassManagerType FunctionPass::getPotentialPassManagerType() const {
}
bool FunctionPass::skipFunction(const Function &F) const {
- if (!F.getContext().getOptBisect().shouldRunPass(this, F))
+ if (!F.getContext().getOptPassGate().shouldRunPass(this, F))
return true;
if (F.hasFnAttribute(Attribute::OptimizeNone)) {
- DEBUG(dbgs() << "Skipping pass '" << getPassName() << "' on function "
- << F.getName() << "\n");
+ LLVM_DEBUG(dbgs() << "Skipping pass '" << getPassName() << "' on function "
+ << F.getName() << "\n");
return true;
}
return false;
@@ -189,13 +190,13 @@ bool BasicBlockPass::skipBasicBlock(const BasicBlock &BB) const {
const Function *F = BB.getParent();
if (!F)
return false;
- if (!F->getContext().getOptBisect().shouldRunPass(this, BB))
+ if (!F->getContext().getOptPassGate().shouldRunPass(this, BB))
return true;
if (F->hasFnAttribute(Attribute::OptimizeNone)) {
// Report this only once per function.
if (&BB == &F->getEntryBlock())
- DEBUG(dbgs() << "Skipping pass '" << getPassName()
- << "' on function " << F->getName() << "\n");
+ LLVM_DEBUG(dbgs() << "Skipping pass '" << getPassName()
+ << "' on function " << F->getName() << "\n");
return true;
}
return false;