================
@@ -4744,11 +4744,12 @@ 
TypeSystemClang::GetBitSize(lldb::opaque_compiler_type_t type,
       ExecutionContext exe_ctx(exe_scope);
       Process *process = exe_ctx.GetProcessPtr();
       if (process) {
-        ObjCLanguageRuntime *objc_runtime = ObjCLanguageRuntime::Get(*process);
-        if (objc_runtime) {
-          uint64_t bit_size = 0;
-          if (objc_runtime->GetTypeBitSize(GetType(qual_type), bit_size))
-            return bit_size;
+        if (ObjCLanguageRuntime *objc_runtime =
+                ObjCLanguageRuntime::Get(*process)) {
+          std::optional<uint64_t> bit_size =
+              objc_runtime->GetTypeBitSize(GetType(qual_type));
+          if (bit_size)
+            return *bit_size;
----------------
Michael137 wrote:

Aah you're right, missed the fallthrough here. Could fold the `GetTypeBitSize` 
call into the if-statement, like you did for `ObjCLanguageRuntime::Get`. But 
either way, LGTM

https://github.com/llvm/llvm-project/pull/96013
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to