aboutsummaryrefslogtreecommitdiff
path: root/llvm/utils/TableGen/CodeGenTarget.cpp
diff options
context:
space:
mode:
authorKazu Hirata <kazu@google.com>2022-12-02 21:11:42 -0800
committerKazu Hirata <kazu@google.com>2022-12-02 21:11:42 -0800
commited88e60b373383322c4b7465d43dc6c06092facb (patch)
treeb4a6a76c912a292419d03441a3b391c832153294 /llvm/utils/TableGen/CodeGenTarget.cpp
parentb4482f7ca04e852cf610ef0e16542c888844d93d (diff)
downloadllvm-ed88e60b373383322c4b7465d43dc6c06092facb.zip
llvm-ed88e60b373383322c4b7465d43dc6c06092facb.tar.gz
llvm-ed88e60b373383322c4b7465d43dc6c06092facb.tar.bz2
[utils] 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/utils/TableGen/CodeGenTarget.cpp')
-rw-r--r--llvm/utils/TableGen/CodeGenTarget.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/utils/TableGen/CodeGenTarget.cpp b/llvm/utils/TableGen/CodeGenTarget.cpp
index 108bf4d..80deae9 100644
--- a/llvm/utils/TableGen/CodeGenTarget.cpp
+++ b/llvm/utils/TableGen/CodeGenTarget.cpp
@@ -400,7 +400,7 @@ CodeGenTarget::getSuperRegForSubReg(const ValueTypeByHwMode &ValueTy,
// If we didn't find anything, we're done.
if (Candidates.empty())
- return None;
+ return std::nullopt;
// Find and return the largest of our candidate classes.
llvm::stable_sort(Candidates, [&](const CodeGenRegisterClass *A,