[PATCH] D128131: [ADT] Add has_value, value, value_or to llvm::Optional

Kazu Hirata via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Jun 18 20:35:41 PDT 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 adds has_value, value, value_or to llvm::Optional so that
llvm::Optional looks more like std::optional.

I will keep the existing functions while migrating their callers and
then remove them later.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D128131

Files:
  llvm/include/llvm/ADT/Optional.h
  llvm/unittests/ADT/OptionalTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D128131.438167.patch
Type: text/x-patch
Size: 5745 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220619/69cb0d86/attachment.bin>


More information about the llvm-commits mailing list