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

Michael Buch via lldb-commits lldb-commits at lists.llvm.org
Fri Oct 17 14:36:08 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);
----------------
Michael137 wrote:

For now just wanted to upstream the version we had. But yea I agree using a `UINT32_MAX` is not ideal. Can change it in a follow-up

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


More information about the lldb-commits mailing list