[Lldb-commits] [lldb] 4022d78 - [lldb] Fix compile error. (#130091)

via lldb-commits lldb-commits at lists.llvm.org
Thu Mar 6 05:00:37 PST 2025


Author: Adrian Kuegel
Date: 2025-03-06T14:00:33+01:00
New Revision: 4022d78591d3ad417731fae2a16035126ff2ca7e

URL: https://github.com/llvm/llvm-project/commit/4022d78591d3ad417731fae2a16035126ff2ca7e
DIFF: https://github.com/llvm/llvm-project/commit/4022d78591d3ad417731fae2a16035126ff2ca7e.diff

LOG: [lldb] Fix compile error. (#130091)

Followup to
https://github.com/llvm/llvm-project/commit/878a64f94a264ea4b564d6063614ddb0b5da3f6c

Added: 
    

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

Removed: 
    


################################################################################
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))


        


More information about the lldb-commits mailing list