================
@@ -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);
----------------
jimingham wrote:
I'm not sure it's the search for UINT32_MAX types that is the problem, but
rather the not handling the case where you got more than one type back. If
there's more than one, how do you know the first one is the right one?
It's fine to do this as a followup, since this code has been working on the
swift fork for a while now. But that's the thing I'd fix, not preemptively
ignoring multiple definitions.
https://github.com/llvm/llvm-project/pull/164011
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits