[Lldb-commits] [lldb] [lldb][ObjC] Consult Objective-C runtime decl vendor when completing type (PR #164011)

Adrian Prantl via lldb-commits lldb-commits at lists.llvm.org
Fri Oct 17 13:48:38 PDT 2025


================
@@ -423,6 +423,46 @@ Status ObjCLanguageRuntime::ObjCExceptionPrecondition::ConfigurePrecondition(
   return error;
 }
 
+CompilerType ObjCLanguageRuntime::LookupInModulesVendor(ConstString class_name,
+                                                        Target &target) {
+  assert(class_name);
+
+  auto *persistent_state = llvm::cast<ClangPersistentVariables>(
+      target.GetPersistentExpressionStateForLanguage(lldb::eLanguageTypeC));
+  if (!persistent_state)
+    return {};
+
+  auto clang_modules_decl_vendor_sp =
+      persistent_state->GetClangModulesDeclVendor();
+  if (!clang_modules_decl_vendor_sp)
+    return {};
+
+  auto types = clang_modules_decl_vendor_sp->FindTypes(
+      class_name, /*max_matches*/ UINT32_MAX);
----------------
adrian-prantl wrote:

Why search for UINT32_MAX types if we only return the first one?

https://github.com/llvm/llvm-project/pull/164011


More information about the lldb-commits mailing list