================
@@ -502,11 +499,8 @@ lldb::SBTypeList SBModule::FindTypes(const char *type) {
             retval.Append(SBType(compiler_type));
       }
     } else {
-      for (size_t idx = 0; idx < type_list.GetSize(); idx++) {
-        TypeSP type_sp(type_list.GetTypeAtIndex(idx));
-        if (type_sp)
-          retval.Append(SBType(type_sp));
-      }
+      for (const TypeSP &type_sp : results.GetTypeMap().Types())
+        retval.Append(SBType(type_sp));
----------------
Michael137 wrote:

Should we add a debug-assert here (or maybe in `InsertUnique`) that tests 
`type_sp != nullptr`?

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

Reply via email to