================
@@ -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;
----------------
JDevlieghere wrote:
That might be the right thing to do, but would be a change in behavior, as now,
if it fails, we'll fall through to the `default` case first.
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