Skip to content
Commit 1792821c authored by Fangrui Song's avatar Fangrui Song
Browse files

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.
parent 411512a7
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment