Skip to content

[lldb] Fix compile error. #130091

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 6, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions lldb/source/Plugins/ABI/ARC/ABISysV_arc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,9 @@ ABISysV_arc::GetReturnValueObjectSimple(Thread &thread,
const uint32_t type_flags = compiler_type.GetTypeInfo();
// Integer return type.
if (type_flags & eTypeIsInteger) {
const size_t byte_size = compiler_type.GetByteSize(&thread).value_or(0);
const size_t byte_size =
llvm::expectedToOptional(compiler_type.GetByteSize(&thread))
.value_or(0);
auto raw_value = ReadRawValue(reg_ctx, byte_size);

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

if (compiler_type.IsFloatingPointType(float_count, is_complex) &&
1 == float_count && !is_complex) {
const size_t byte_size = compiler_type.GetByteSize(&thread).value_or(0);
const size_t byte_size =
llvm::expectedToOptional(compiler_type.GetByteSize(&thread))
.value_or(0);
auto raw_value = ReadRawValue(reg_ctx, byte_size);

if (!SetSizedFloat(value.GetScalar(), raw_value, byte_size))
Expand Down
Loading