[PATCH] D139241: [ADT, Support] Use std::nullopt instead of None (NFC)

Kazu Hirata via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 2 17:59:34 PST 2022


kazu created this revision.
Herald added a project: All.
kazu requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

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


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D139241

Files:
  llvm/include/llvm/ADT/AddressRanges.h
  llvm/include/llvm/ADT/BreadthFirstIterator.h
  llvm/include/llvm/ADT/DepthFirstIterator.h
  llvm/include/llvm/ADT/Optional.h
  llvm/include/llvm/ADT/STLExtras.h
  llvm/include/llvm/ADT/StringMapEntry.h
  llvm/include/llvm/ADT/TinyPtrVector.h
  llvm/include/llvm/Support/Allocator.h
  llvm/include/llvm/Support/CheckedArithmetic.h
  llvm/include/llvm/Support/Error.h
  llvm/include/llvm/Support/FileUtilities.h
  llvm/include/llvm/Support/Format.h
  llvm/include/llvm/Support/FormatProviders.h
  llvm/include/llvm/Support/InstructionCost.h
  llvm/include/llvm/Support/JSON.h
  llvm/include/llvm/Support/MemoryBuffer.h
  llvm/include/llvm/Support/NativeFormatting.h
  llvm/include/llvm/Support/VersionTuple.h
  llvm/include/llvm/Support/VirtualFileSystem.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D139241.479789.patch
Type: text/x-patch
Size: 21724 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221203/7588ecff/attachment.bin>


More information about the llvm-commits mailing list