aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/IR/OptBisect.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/IR/OptBisect.cpp')
-rw-r--r--llvm/lib/IR/OptBisect.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/llvm/lib/IR/OptBisect.cpp b/llvm/lib/IR/OptBisect.cpp
index 418311eac814..c9054dba344a 100644
--- a/llvm/lib/IR/OptBisect.cpp
+++ b/llvm/lib/IR/OptBisect.cpp
@@ -23,7 +23,7 @@ using namespace llvm;
static cl::opt<int> OptBisectLimit("opt-bisect-limit", cl::Hidden,
cl::init(OptBisect::Disabled), cl::Optional,
cl::cb<void, int>([](int Limit) {
- llvm::OptBisector->setLimit(Limit);
+ llvm::getOptBisector().setLimit(Limit);
}),
cl::desc("Maximum optimization to perform"));
@@ -52,4 +52,7 @@ bool OptBisect::checkPass(const StringRef PassName,
const int OptBisect::Disabled;
-ManagedStatic<OptBisect> llvm::OptBisector;
+OptBisect &llvm::getOptBisector() {
+ static OptBisect OptBisector;
+ return OptBisector;
+}