@@ -249,51 +249,6 @@ void ValueObject::ClearDynamicTypeInformation() {
249249 SetSyntheticChildren (lldb::SyntheticChildrenSP ());
250250}
251251
252- CompilerType ValueObject::LookupInModulesVendor (ConstString class_name,
253- Target &target) {
254- assert (class_name);
255-
256- auto *persistent_state = llvm::cast<ClangPersistentVariables>(
257- target.GetPersistentExpressionStateForLanguage (lldb::eLanguageTypeC));
258- if (!persistent_state)
259- return {};
260-
261- auto clang_modules_decl_vendor_sp =
262- persistent_state->GetClangModulesDeclVendor ();
263- if (!clang_modules_decl_vendor_sp)
264- return {};
265-
266- auto types = clang_modules_decl_vendor_sp->FindTypes (
267- class_name, /* max_matches*/ UINT32_MAX);
268- if (types.empty ())
269- return {};
270-
271- return types.front ();
272- }
273-
274- CompilerType ValueObject::LookupInRuntime (ConstString class_name,
275- Process &process) {
276- auto *objc_language_runtime = ObjCLanguageRuntime::Get (process);
277- if (!objc_language_runtime)
278- return {};
279-
280- auto *runtime_vendor = objc_language_runtime->GetDeclVendor ();
281- if (!runtime_vendor)
282- return {};
283-
284- std::vector<CompilerDecl> compiler_decls;
285- runtime_vendor->FindDecls (class_name, false , UINT32_MAX, compiler_decls);
286- if (compiler_decls.empty ())
287- return {};
288-
289- auto *ctx =
290- llvm::dyn_cast<TypeSystemClang>(compiler_decls[0 ].GetTypeSystem ());
291- if (!ctx)
292- return {};
293-
294- return ctx->GetTypeForDecl (compiler_decls[0 ].GetOpaqueDecl ());
295- }
296-
297252CompilerType ValueObject::MaybeCalculateCompleteType () {
298253 CompilerType compiler_type (GetCompilerTypeImpl ());
299254
@@ -322,31 +277,6 @@ CompilerType ValueObject::MaybeCalculateCompleteType() {
322277 }
323278 }
324279
325- CompilerType class_type;
326- bool is_pointer_type = false ;
327- if (TypeSystemClang::IsObjCObjectPointerType (compiler_type, &class_type))
328- is_pointer_type = true ;
329- else if (TypeSystemClang::IsObjCObjectOrInterfaceType (compiler_type))
330- class_type = compiler_type;
331- else
332- return compiler_type;
333-
334- ConstString class_name (class_type.GetTypeName ());
335- if (!class_name)
336- return compiler_type;
337-
338- if (auto target_sp = GetTargetSP ()) {
339- if (CompilerType found = LookupInModulesVendor (class_name, *target_sp)) {
340- m_override_type = is_pointer_type ? found.GetPointerType () : found;
341- return m_override_type;
342- }
343- }
344-
345- if (CompilerType found = LookupInRuntime (class_name, *process_sp)) {
346- m_override_type = is_pointer_type ? found.GetPointerType () : found;
347- return m_override_type;
348- }
349-
350280 return compiler_type;
351281}
352282
0 commit comments