Skip to content

Commit 4022d78

Browse files
authored
[lldb] Fix compile error. (llvm#130091)
Followup to llvm@878a64f
1 parent 9ea2da5 commit 4022d78

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

lldb/source/Plugins/ABI/ARC/ABISysV_arc.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -459,7 +459,9 @@ ABISysV_arc::GetReturnValueObjectSimple(Thread &thread,
459459
const uint32_t type_flags = compiler_type.GetTypeInfo();
460460
// Integer return type.
461461
if (type_flags & eTypeIsInteger) {
462-
const size_t byte_size = compiler_type.GetByteSize(&thread).value_or(0);
462+
const size_t byte_size =
463+
llvm::expectedToOptional(compiler_type.GetByteSize(&thread))
464+
.value_or(0);
463465
auto raw_value = ReadRawValue(reg_ctx, byte_size);
464466

465467
const bool is_signed = (type_flags & eTypeIsSigned) != 0;
@@ -483,7 +485,9 @@ ABISysV_arc::GetReturnValueObjectSimple(Thread &thread,
483485

484486
if (compiler_type.IsFloatingPointType(float_count, is_complex) &&
485487
1 == float_count && !is_complex) {
486-
const size_t byte_size = compiler_type.GetByteSize(&thread).value_or(0);
488+
const size_t byte_size =
489+
llvm::expectedToOptional(compiler_type.GetByteSize(&thread))
490+
.value_or(0);
487491
auto raw_value = ReadRawValue(reg_ctx, byte_size);
488492

489493
if (!SetSizedFloat(value.GetScalar(), raw_value, byte_size))

0 commit comments

Comments
 (0)