Undo one llvm::Optional => std::optional
authorPaul Robinson <paul.robinson@sony.com>
Fri, 16 Dec 2022 17:40:51 +0000 (09:40 -0800)
committerPaul Robinson <paul.robinson@sony.com>
Fri, 16 Dec 2022 17:41:20 +0000 (09:41 -0800)
commit08c8280d5d8af7fb995aec8fc00b8cfbca4e9505
tree89f16186742ea41d08cb6b612ec1a53fdc21d61b
parent588ecc11b8959b716cc5337a03064046eddb3a29
Undo one llvm::Optional => std::optional

Using std::optional in Support/TypeTraitsTest.cpp causes gcc 7.5 to
complain. No public bots run a gcc that old, but we have internal bots
that do.

/home/probinson/projects/llvm-org/llvm-project/llvm/unittests/Support/TypeTraitsTest.cpp: In instantiation of ‘void {anonymous}::triviality::TrivialityTester() [with T = std::optional<int>; bool IsTriviallyCopyConstructible = true; bool IsTriviallyMoveConstructible = true]’:
/home/probinson/projects/llvm-org/llvm-project/llvm/unittests/Support/TypeTraitsTest.cpp:121:52:   required from here
/home/probinson/projects/llvm-org/llvm-project/llvm/unittests/Support/TypeTraitsTest.cpp:29:3: error: static assertion failed: Mismatch in expected trivial copy construction!
   static_assert(llvm::is_trivially_copy_constructible<T>::value ==
   ^~~~~~~~~~~~~
/home/probinson/projects/llvm-org/llvm-project/llvm/unittests/Support/TypeTraitsTest.cpp:32:3: error: static assertion failed: Mismatch in expected trivial move construction!
   static_assert(llvm::is_trivially_move_constructible<T>::value ==
   ^~~~~~~~~~~~~
llvm/unittests/Support/TypeTraitsTest.cpp