[Analysis] Use std::nullopt instead of None (NFC)
authorKazu Hirata <kazu@google.com>
Sat, 3 Dec 2022 03:43:04 +0000 (19:43 -0800)
committerKazu Hirata <kazu@google.com>
Sat, 3 Dec 2022 03:43:04 +0000 (19:43 -0800)
commit19aff0f37dd68ee51e78b764c0ce629ae73d1eef
tree07403086631814ae1ff7742c8c6dac4fb67b5088
parentfef3a16aeab660d0789c592985993bd68b51f517
[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
39 files changed:
llvm/include/llvm/Analysis/IRSimilarityIdentifier.h
llvm/include/llvm/Analysis/InlineAdvisor.h
llvm/include/llvm/Analysis/InlineCost.h
llvm/include/llvm/Analysis/LoopAccessAnalysis.h
llvm/include/llvm/Analysis/LoopCacheAnalysis.h
llvm/include/llvm/Analysis/MemoryDependenceAnalysis.h
llvm/include/llvm/Analysis/ObjCARCAnalysisUtils.h
llvm/include/llvm/Analysis/ObjCARCUtil.h
llvm/include/llvm/Analysis/ScalarEvolution.h
llvm/include/llvm/Analysis/TargetLibraryInfo.h
llvm/include/llvm/Analysis/TargetTransformInfo.h
llvm/include/llvm/Analysis/TargetTransformInfoImpl.h
llvm/include/llvm/Analysis/ValueLattice.h
llvm/lib/Analysis/AliasAnalysis.cpp
llvm/lib/Analysis/AliasAnalysisSummary.cpp
llvm/lib/Analysis/BasicAliasAnalysis.cpp
llvm/lib/Analysis/BlockFrequencyInfo.cpp
llvm/lib/Analysis/BlockFrequencyInfoImpl.cpp
llvm/lib/Analysis/BranchProbabilityInfo.cpp
llvm/lib/Analysis/CFLAndersAliasAnalysis.cpp
llvm/lib/Analysis/InlineAdvisor.cpp
llvm/lib/Analysis/InlineCost.cpp
llvm/lib/Analysis/InlineSizeEstimatorAnalysis.cpp
llvm/lib/Analysis/LazyValueInfo.cpp
llvm/lib/Analysis/Lint.cpp
llvm/lib/Analysis/LoopAccessAnalysis.cpp
llvm/lib/Analysis/LoopCacheAnalysis.cpp
llvm/lib/Analysis/LoopInfo.cpp
llvm/lib/Analysis/LoopNestAnalysis.cpp
llvm/lib/Analysis/MemoryBuiltins.cpp
llvm/lib/Analysis/MemorySSA.cpp
llvm/lib/Analysis/OptimizationRemarkEmitter.cpp
llvm/lib/Analysis/ProfileSummaryInfo.cpp
llvm/lib/Analysis/ReplayInlineAdvisor.cpp
llvm/lib/Analysis/ScalarEvolution.cpp
llvm/lib/Analysis/StratifiedSets.h
llvm/lib/Analysis/TensorSpec.cpp
llvm/lib/Analysis/VFABIDemangling.cpp
llvm/lib/Analysis/ValueTracking.cpp