Optional: Deprecated value()
authorFangrui Song <i@maskray.me>
Sat, 17 Dec 2022 22:43:03 +0000 (22:43 +0000)
committerFangrui Song <i@maskray.me>
Sat, 17 Dec 2022 22:43:03 +0000 (22:43 +0000)
commit1792821c8308755593c114c3b7ae8ce33bdb08e9
tree94e7c19fb5d8c305a93b9154c42a3515164fcebd
parent411512a7ce9c960bb2ac5b976d45f7ca1a2f63de
Optional: Deprecated value()

https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716/19

value() is a 15.0.0 API for std::optional migration.
std::optional::value() has undesired exception checking semantics and is
unavailable in older Xcode (see
_LIBCPP_AVAILABILITY_BAD_OPTIONAL_ACCESS). Deprecate value() to prevent
new in-tree uses which may accidentally cause build breakage for older
Xcode when contributors perform std::optional migrating.

Some downtream MLIR projects such as tensorflow/mlir-hlo, stablehlo use
value(), so we do not remove it now.
llvm/include/llvm/ADT/Optional.h