diff options
author | Kazu Hirata <kazu@google.com> | 2022-12-02 19:43:04 -0800 |
---|---|---|
committer | Kazu Hirata <kazu@google.com> | 2022-12-02 19:43:04 -0800 |
commit | 19aff0f37dd68ee51e78b764c0ce629ae73d1eef (patch) | |
tree | 07403086631814ae1ff7742c8c6dac4fb67b5088 /llvm/lib/Analysis/BasicAliasAnalysis.cpp | |
parent | fef3a16aeab660d0789c592985993bd68b51f517 (diff) | |
download | llvm-19aff0f37dd68ee51e78b764c0ce629ae73d1eef.zip llvm-19aff0f37dd68ee51e78b764c0ce629ae73d1eef.tar.gz llvm-19aff0f37dd68ee51e78b764c0ce629ae73d1eef.tar.bz2 |
[Analysis] 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/Analysis/BasicAliasAnalysis.cpp')
-rw-r--r-- | llvm/lib/Analysis/BasicAliasAnalysis.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Analysis/BasicAliasAnalysis.cpp b/llvm/lib/Analysis/BasicAliasAnalysis.cpp index 3881beb..e70be0f 100644 --- a/llvm/lib/Analysis/BasicAliasAnalysis.cpp +++ b/llvm/lib/Analysis/BasicAliasAnalysis.cpp @@ -574,7 +574,7 @@ BasicAAResult::DecomposeGEPExpression(const Value *V, const DataLayout &DL, // Track whether we've seen at least one in bounds gep, and if so, whether // all geps parsed were in bounds. - if (Decomposed.InBounds == None) + if (Decomposed.InBounds == std::nullopt) Decomposed.InBounds = GEPOp->isInBounds(); else if (!GEPOp->isInBounds()) Decomposed.InBounds = false; |