diff options
author | Fangrui Song <i@maskray.me> | 2022-12-01 22:36:05 +0000 |
---|---|---|
committer | Daniel Thornburgh <dthorn@google.com> | 2022-12-01 15:57:17 -0800 |
commit | 7f5d0aa5274e18af0d3a9be92fb9f677c9fe6dc4 (patch) | |
tree | 404cab3bb1af4408b5cb1eb12110d8771afd4981 /llvm/lib/Support/Threading.cpp | |
parent | 1028b165ee9a29f481ba6e990f925e0473d5c4d0 (diff) | |
download | llvm-7f5d0aa5274e18af0d3a9be92fb9f677c9fe6dc4.zip llvm-7f5d0aa5274e18af0d3a9be92fb9f677c9fe6dc4.tar.gz llvm-7f5d0aa5274e18af0d3a9be92fb9f677c9fe6dc4.tar.bz2 |
Threading: Convert Optional to std::optional
dthorn: Relanding after fix-forward.
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 910437c..24962ae 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 -Optional<ThreadPoolStrategy> +std::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 None; // malformed 'Num' value + return std::nullopt; // malformed 'Num' value if (V == 0) return Default; |