diff options
Diffstat (limited to 'lldb/source/Plugins')
5 files changed, 10 insertions, 13 deletions
diff --git a/lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp b/lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp index ff86f9f818b..b0043f9c0f6 100644 --- a/lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp +++ b/lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp @@ -1861,7 +1861,7 @@ CompilerType ClangASTSource::GuardedCopyType(const CompilerType &src_type) { // seems to be generating bad types on occasion. return CompilerType(); - return CompilerType(m_clang_ast_context, copied_qual_type.getAsOpaquePtr()); + return m_clang_ast_context->GetType(copied_qual_type); } clang::NamedDecl *NameSearchContext::AddVarDecl(const CompilerType &type) { @@ -1988,9 +1988,8 @@ clang::NamedDecl *NameSearchContext::AddGenericFunDecl() { ArrayRef<QualType>(), // argument types proto_info)); - return AddFunDecl(CompilerType(m_ast_source.m_clang_ast_context, - generic_function_type.getAsOpaquePtr()), - true); + return AddFunDecl( + m_ast_source.m_clang_ast_context->GetType(generic_function_type), true); } clang::NamedDecl * diff --git a/lldb/source/Plugins/Language/ObjC/NSArray.cpp b/lldb/source/Plugins/Language/ObjC/NSArray.cpp index 64461fc2bc0..0ac7fb6d233 100644 --- a/lldb/source/Plugins/Language/ObjC/NSArray.cpp +++ b/lldb/source/Plugins/Language/ObjC/NSArray.cpp @@ -612,9 +612,8 @@ lldb_private::formatters::GenericNSArrayISyntheticFrontEnd<D32, D64, Inline>:: auto *clang_ast_context = ClangASTContext::GetScratch( *valobj_sp->GetExecutionContextRef().GetTargetSP()); if (clang_ast_context) - m_id_type = CompilerType(clang_ast_context, - clang_ast_context->getASTContext() - .ObjCBuiltinIdTy.getAsOpaquePtr()); + m_id_type = clang_ast_context->GetType( + clang_ast_context->getASTContext().ObjCBuiltinIdTy); } } } diff --git a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTypeEncodingParser.cpp b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTypeEncodingParser.cpp index 5fa4073f40b..d92f782c72e 100644 --- a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTypeEncodingParser.cpp +++ b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTypeEncodingParser.cpp @@ -137,8 +137,7 @@ clang::QualType AppleObjCTypeEncodingParser::BuildAggregate( element.name = elem_name.GetString(); } ClangASTContext::AddFieldToRecordType( - union_type, element.name.c_str(), - CompilerType(&ast_ctx, element.type.getAsOpaquePtr()), + union_type, element.name.c_str(), ast_ctx.GetType(element.type), lldb::eAccessPublic, element.bitfield); ++count; } @@ -362,7 +361,7 @@ CompilerType AppleObjCTypeEncodingParser::RealizeType(ClangASTContext &ast_ctx, if (name && name[0]) { StringLexer lexer(name); clang::QualType qual_type = BuildType(ast_ctx, lexer, for_expression); - return CompilerType(&ast_ctx, qual_type.getAsOpaquePtr()); + return ast_ctx.GetType(qual_type); } return CompilerType(); } diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp index 96dd72bb100..3cae9a19001 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp +++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp @@ -2086,8 +2086,8 @@ bool DWARFASTParserClang::CompleteRecordType(const DWARFDIE &die, clang::TypeSourceInfo *type_source_info = base_class->getTypeSourceInfo(); if (type_source_info) { - CompilerType base_class_type( - &m_ast, type_source_info->getType().getAsOpaquePtr()); + CompilerType base_class_type = + m_ast.GetType(type_source_info->getType()); if (!base_class_type.GetCompleteType()) { auto module = dwarf->GetObjectFile()->GetModule(); module->ReportError(":: Class '%s' has a base class '%s' which " diff --git a/lldb/source/Plugins/SymbolFile/NativePDB/PdbAstBuilder.cpp b/lldb/source/Plugins/SymbolFile/NativePDB/PdbAstBuilder.cpp index 7a1a64816f4..4588c80aa1b 100644 --- a/lldb/source/Plugins/SymbolFile/NativePDB/PdbAstBuilder.cpp +++ b/lldb/source/Plugins/SymbolFile/NativePDB/PdbAstBuilder.cpp @@ -1078,7 +1078,7 @@ void PdbAstBuilder::CreateFunctionParameters(PdbCompilandSymId func_id, PdbCompilandSymId param_uid(func_id.modi, record_offset); clang::QualType qt = GetOrCreateType(param_type); - CompilerType param_type_ct(&m_clang, qt.getAsOpaquePtr()); + CompilerType param_type_ct = m_clang.GetType(qt); clang::ParmVarDecl *param = m_clang.CreateParameterDeclaration( &function_decl, param_name.str().c_str(), param_type_ct, clang::SC_None, true); |