diff options
author | Daniel Thornburgh <dthorn@google.com> | 2022-12-01 15:42:25 -0800 |
---|---|---|
committer | Daniel Thornburgh <dthorn@google.com> | 2022-12-01 15:42:25 -0800 |
commit | 8f0aa9df11195ef435717b24401fe76be06cd69f (patch) | |
tree | 6f7410a1c2c69338f5b49a9cdf4b71f769de3631 /llvm/lib/Support/Threading.cpp | |
parent | 5d6ed9ff0c85530ed7f2d706cdcd0d942cb6abf1 (diff) | |
download | llvm-8f0aa9df11195ef435717b24401fe76be06cd69f.zip llvm-8f0aa9df11195ef435717b24401fe76be06cd69f.tar.gz llvm-8f0aa9df11195ef435717b24401fe76be06cd69f.tar.bz2 |
Revert "Threading: Convert Optional to std::optional"
This reverts commit 5e50b8089aee249d77542ea858d956568ec6581f.
This commit breaks the build for BOLT:
bolt/lib/Profile/DataAggregator.cpp:264:66: error: no viable
conversion from 'Optional<StringRef>[3]' to
'ArrayRef<std::optional<StringRef>>'
Diffstat (limited to 'llvm/lib/Support/Threading.cpp')
-rw-r--r-- | llvm/lib/Support/Threading.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Support/Threading.cpp b/llvm/lib/Support/Threading.cpp index 24962ae..910437c 100644 --- a/llvm/lib/Support/Threading.cpp +++ b/llvm/lib/Support/Threading.cpp @@ -90,7 +90,7 @@ const llvm::Optional<unsigned> llvm::thread::DefaultStackSize; #endif -std::optional<ThreadPoolStrategy> +Optional<ThreadPoolStrategy> llvm::get_threadpool_strategy(StringRef Num, ThreadPoolStrategy Default) { if (Num == "all") return llvm::hardware_concurrency(); @@ -98,7 +98,7 @@ llvm::get_threadpool_strategy(StringRef Num, ThreadPoolStrategy Default) { return Default; unsigned V; if (Num.getAsInteger(10, V)) - return std::nullopt; // malformed 'Num' value + return None; // malformed 'Num' value if (V == 0) return Default; |