aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/IR/ConstantRange.cpp
diff options
context:
space:
mode:
authorKazu Hirata <kazu@google.com>2022-12-02 20:05:20 -0800
committerKazu Hirata <kazu@google.com>2022-12-02 20:05:20 -0800
commite842c06c2d52ae1d60db7ed528ea3f4215a0aad6 (patch)
tree2fa4d17e05b9dec6d22fddb83293ebb43b0dfc7d /llvm/lib/IR/ConstantRange.cpp
parent19aff0f37dd68ee51e78b764c0ce629ae73d1eef (diff)
downloadllvm-e842c06c2d52ae1d60db7ed528ea3f4215a0aad6.zip
llvm-e842c06c2d52ae1d60db7ed528ea3f4215a0aad6.tar.gz
llvm-e842c06c2d52ae1d60db7ed528ea3f4215a0aad6.tar.bz2
[IR] 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/lib/IR/ConstantRange.cpp')
-rw-r--r--llvm/lib/IR/ConstantRange.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/IR/ConstantRange.cpp b/llvm/lib/IR/ConstantRange.cpp
index 9d23910..d443f2c 100644
--- a/llvm/lib/IR/ConstantRange.cpp
+++ b/llvm/lib/IR/ConstantRange.cpp
@@ -705,7 +705,7 @@ ConstantRange::exactIntersectWith(const ConstantRange &CR) const {
ConstantRange Result = intersectWith(CR);
if (Result == inverse().unionWith(CR.inverse()).inverse())
return Result;
- return None;
+ return std::nullopt;
}
Optional<ConstantRange>
@@ -714,7 +714,7 @@ ConstantRange::exactUnionWith(const ConstantRange &CR) const {
ConstantRange Result = unionWith(CR);
if (Result == inverse().intersectWith(CR.inverse()).inverse())
return Result;
- return None;
+ return std::nullopt;
}
ConstantRange ConstantRange::castOp(Instruction::CastOps CastOp,