Author: Adrian Prantl
Date: 2025-03-09T12:04:22-07:00
New Revision: 2317a72489145f582ac1f01bc8c4f3b6bb5abb44

URL: 
https://github.com/llvm/llvm-project/commit/2317a72489145f582ac1f01bc8c4f3b6bb5abb44
DIFF: 
https://github.com/llvm/llvm-project/commit/2317a72489145f582ac1f01bc8c4f3b6bb5abb44.diff

LOG: [lldb] Add missing converstion to optional

Added: 
    

Modified: 
    lldb/source/ValueObject/ValueObjectChild.cpp

Removed: 
    


################################################################################
diff  --git a/lldb/source/ValueObject/ValueObjectChild.cpp 
b/lldb/source/ValueObject/ValueObjectChild.cpp
index ea211530591cf..d7f1ad08415e3 100644
--- a/lldb/source/ValueObject/ValueObjectChild.cpp
+++ b/lldb/source/ValueObject/ValueObjectChild.cpp
@@ -164,8 +164,9 @@ bool ValueObjectChild::UpdateValue() {
             const bool thread_and_frame_only_if_stopped = true;
             ExecutionContext exe_ctx(GetExecutionContextRef().Lock(
                 thread_and_frame_only_if_stopped));
-            if (auto type_bit_size = GetCompilerType().GetBitSize(
-                    exe_ctx.GetBestExecutionContextScope())) {
+            if (auto type_bit_size =
+                    llvm::expectedToOptional(GetCompilerType().GetBitSize(
+                        exe_ctx.GetBestExecutionContextScope()))) {
               uint64_t bitfield_end =
                   m_bitfield_bit_size + m_bitfield_bit_offset;
               if (bitfield_end > *type_bit_size) {


        
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to