diff options
author | Kazu Hirata <kazu@google.com> | 2022-12-02 21:11:40 -0800 |
---|---|---|
committer | Kazu Hirata <kazu@google.com> | 2022-12-02 21:11:40 -0800 |
commit | b4482f7ca04e852cf610ef0e16542c888844d93d (patch) | |
tree | c57a5c84ed6e99c56cbe9685401cef676e69f73f /llvm/tools/llvm-exegesis/lib/BenchmarkResult.cpp | |
parent | 110115993cad38755afa0371caa87459a93d5451 (diff) | |
download | llvm-b4482f7ca04e852cf610ef0e16542c888844d93d.zip llvm-b4482f7ca04e852cf610ef0e16542c888844d93d.tar.gz llvm-b4482f7ca04e852cf610ef0e16542c888844d93d.tar.bz2 |
[tools] Use std::nullopt instead of None (NFC)
This patch mechanically replaces None with std::nullopt where the
compiler would warn if None were deprecated. The intent is to reduce
the amount of manual work required in migrating from Optional to
std::optional.
This is part of an effort to migrate from llvm::Optional to
std::optional:
https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716
Diffstat (limited to 'llvm/tools/llvm-exegesis/lib/BenchmarkResult.cpp')
-rw-r--r-- | llvm/tools/llvm-exegesis/lib/BenchmarkResult.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/tools/llvm-exegesis/lib/BenchmarkResult.cpp b/llvm/tools/llvm-exegesis/lib/BenchmarkResult.cpp index 698c77d5..99c6567 100644 --- a/llvm/tools/llvm-exegesis/lib/BenchmarkResult.cpp +++ b/llvm/tools/llvm-exegesis/lib/BenchmarkResult.cpp @@ -102,7 +102,7 @@ struct YamlContext { if (Iter != RegNameToRegNo.end()) return Iter->second; ErrorStream << "No register with name '" << RegName << "'\n"; - return None; + return std::nullopt; } private: |