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

[lldb] Fix compile error. #130091

merged 1 commit into from
Mar 6, 2025

Conversation

akuegel
Copy link
Member

@akuegel akuegel commented Mar 6, 2025

Followup to 878a64f

@akuegel akuegel requested a review from JDevlieghere as a code owner March 6, 2025 12:29
@llvmbot llvmbot added the lldb label Mar 6, 2025
@llvmbot
Copy link
Member

llvmbot commented Mar 6, 2025

@llvm/pr-subscribers-lldb

Author: Adrian Kuegel (akuegel)

Changes

Followup to 878a64f


Full diff: https://github.com/llvm/llvm-project/pull/130091.diff

1 Files Affected:

  • (modified) lldb/source/Plugins/ABI/ARC/ABISysV_arc.cpp (+6-2)
diff --git a/lldb/source/Plugins/ABI/ARC/ABISysV_arc.cpp b/lldb/source/Plugins/ABI/ARC/ABISysV_arc.cpp
index a38396dc14635..21bc0f28db0b9 100644
--- a/lldb/source/Plugins/ABI/ARC/ABISysV_arc.cpp
+++ b/lldb/source/Plugins/ABI/ARC/ABISysV_arc.cpp
@@ -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;
@@ -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))

@akuegel akuegel requested a review from gribozavr March 6, 2025 12:39
@akuegel akuegel merged commit 4022d78 into llvm:main Mar 6, 2025
8 of 11 checks passed
adrian-prantl pushed a commit to adrian-prantl/llvm-project that referenced this pull request Mar 9, 2025
Followup to
llvm@878a64f

(cherry picked from commit 4022d78)
adrian-prantl pushed a commit to adrian-prantl/llvm-project that referenced this pull request Mar 13, 2025
Followup to
llvm@878a64f

(cherry picked from commit 4022d78)
jph-13 pushed a commit to jph-13/llvm-project that referenced this pull request Mar 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants