[BOLT] Use std::nullopt instead of None (NFC)
authorKazu Hirata <kazu@google.com>
Sat, 3 Dec 2022 07:12:38 +0000 (23:12 -0800)
committerKazu Hirata <kazu@google.com>
Sat, 3 Dec 2022 07:12:38 +0000 (23:12 -0800)
commite324a80fab627dd04a454812fcb84f6b9af12546
treeacf4f714c36df0bf2b79131d94c92a0f8a02be4f
parentc68af42fa842c1aab72ff95642ec941499f992a9
[BOLT] 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
19 files changed:
bolt/include/bolt/Core/BinaryContext.h
bolt/include/bolt/Core/BinaryFunction.h
bolt/include/bolt/Core/DebugData.h
bolt/include/bolt/Core/MCPlusBuilder.h
bolt/include/bolt/Passes/ReachingDefOrUse.h
bolt/include/bolt/Rewrite/DWARFRewriter.h
bolt/lib/Core/BinaryContext.cpp
bolt/lib/Core/DebugData.cpp
bolt/lib/Core/MCPlusBuilder.cpp
bolt/lib/Passes/AsmDump.cpp
bolt/lib/Passes/DataflowInfoManager.cpp
bolt/lib/Profile/BoltAddressTranslation.cpp
bolt/lib/Profile/DataAggregator.cpp
bolt/lib/Profile/DataReader.cpp
bolt/lib/Rewrite/DWARFRewriter.cpp
bolt/lib/Rewrite/MachORewriteInstance.cpp
bolt/lib/Rewrite/RewriteInstance.cpp
bolt/lib/Target/X86/X86MCPlusBuilder.cpp
bolt/lib/Utils/Utils.cpp