@@ -749,7 +749,7 @@ void SwiftASTManipulator::FindVariableDeclarations(
749749 auto type = var_decl->getDeclContext ()->mapTypeIntoContext (
750750 var_decl->getInterfaceType ());
751751 persistent_info.m_name = name;
752- persistent_info.m_type = {type. getPointer ()} ;
752+ persistent_info.m_type = SwiftASTContext::GetCompilerType (type) ;
753753 persistent_info.m_decl = var_decl;
754754
755755 m_variables.push_back (persistent_info);
@@ -815,7 +815,7 @@ void SwiftASTManipulator::InsertResult(
815815 SwiftASTManipulator::ResultLocationInfo &result_info) {
816816 swift::ASTContext &ast_context = m_source_file.getASTContext ();
817817
818- CompilerType return_ast_type (result_type. getPointer () );
818+ CompilerType return_ast_type = SwiftASTContext::GetCompilerType (result_type);
819819
820820 result_var->overwriteAccess (swift::AccessLevel::Public);
821821 result_var->overwriteSetterAccess (swift::AccessLevel::Public);
@@ -856,7 +856,8 @@ void SwiftASTManipulator::InsertError(swift::VarDecl *error_var,
856856
857857 swift::ASTContext &ast_context = m_source_file.getASTContext ();
858858
859- CompilerType error_ast_type (error_type.getPointer ());
859+ CompilerType error_ast_type =
860+ SwiftASTContext::GetCompilerType (error_type);
860861
861862 error_var->overwriteAccess (swift::AccessLevel::Public);
862863 error_var->overwriteSetterAccess (swift::AccessLevel::Public);
@@ -956,7 +957,8 @@ bool SwiftASTManipulator::FixupResultAfterTypeChecking(Status &error) {
956957
957958 swift::ASTContext &ast_context = m_source_file.getASTContext ();
958959
959- CompilerType return_ast_type (result_type.getPointer ());
960+ CompilerType return_ast_type =
961+ SwiftASTContext::GetCompilerType (result_type);
960962 swift::Identifier result_var_name =
961963 ast_context.getIdentifier (GetResultName ());
962964 SwiftASTManipulatorBase::VariableMetadataSP metadata_sp (
@@ -1000,7 +1002,7 @@ bool SwiftASTManipulator::FixupResultAfterTypeChecking(Status &error) {
10001002 continue ;
10011003
10021004 swift::Type error_type = var_decl->getInterfaceType ();
1003- CompilerType error_ast_type (error_type. getPointer () );
1005+ CompilerType error_ast_type = SwiftASTContext::GetCompilerType (error_type);
10041006 SwiftASTManipulatorBase::VariableMetadataSP error_metadata_sp (
10051007 new VariableMetadataError ());
10061008
0 commit comments