[lldb] llvm::Optional::value() && => operator*/operator->

std::optional::value() has undesired exception checking semantics and is
unavailable in older Xcode (see _LIBCPP_AVAILABILITY_BAD_OPTIONAL_ACCESS). The
call sites block std::optional migration.
This commit is contained in:
Fangrui Song
2022-12-17 20:37:13 +00:00
parent b6ef76a1ec
commit f43886e7ba
8 changed files with 31 additions and 33 deletions

View File

@@ -2049,7 +2049,7 @@ lldb::ValueObjectSP Thread::GetSiginfoValue() {
llvm::Optional<uint64_t> type_size = type.GetByteSize(nullptr);
assert(type_size);
llvm::Expected<std::unique_ptr<llvm::MemoryBuffer>> data =
GetSiginfo(type_size.value());
GetSiginfo(*type_size);
if (!data)
return ValueObjectConstResult::Create(&target, Status(data.takeError()));