@@ -748,7 +748,7 @@ void SwiftASTManipulator::FindVariableDeclarations(
748748 auto type = var_decl->getDeclContext ()->mapTypeIntoContext (
749749 var_decl->getInterfaceType ());
750750 persistent_info.m_name = name;
751- persistent_info.m_type = {type. getPointer ()} ;
751+ persistent_info.m_type = SwiftASTContext::GetCompilerType (type) ;
752752 persistent_info.m_decl = var_decl;
753753
754754 m_variables.push_back (persistent_info);
@@ -814,7 +814,7 @@ void SwiftASTManipulator::InsertResult(
814814 SwiftASTManipulator::ResultLocationInfo &result_info) {
815815 swift::ASTContext &ast_context = m_source_file.getASTContext ();
816816
817- CompilerType return_ast_type (result_type. getPointer () );
817+ CompilerType return_ast_type = SwiftASTContext::GetCompilerType (result_type);
818818
819819 result_var->overwriteAccess (swift::AccessLevel::Public);
820820 result_var->overwriteSetterAccess (swift::AccessLevel::Public);
@@ -855,7 +855,8 @@ void SwiftASTManipulator::InsertError(swift::VarDecl *error_var,
855855
856856 swift::ASTContext &ast_context = m_source_file.getASTContext ();
857857
858- CompilerType error_ast_type (error_type.getPointer ());
858+ CompilerType error_ast_type =
859+ SwiftASTContext::GetCompilerType (error_type);
859860
860861 error_var->overwriteAccess (swift::AccessLevel::Public);
861862 error_var->overwriteSetterAccess (swift::AccessLevel::Public);
@@ -955,7 +956,8 @@ bool SwiftASTManipulator::FixupResultAfterTypeChecking(Status &error) {
955956
956957 swift::ASTContext &ast_context = m_source_file.getASTContext ();
957958
958- CompilerType return_ast_type (result_type.getPointer ());
959+ CompilerType return_ast_type =
960+ SwiftASTContext::GetCompilerType (result_type);
959961 swift::Identifier result_var_name =
960962 ast_context.getIdentifier (GetResultName ());
961963 SwiftASTManipulatorBase::VariableMetadataSP metadata_sp (
@@ -999,7 +1001,7 @@ bool SwiftASTManipulator::FixupResultAfterTypeChecking(Status &error) {
9991001 continue ;
10001002
10011003 swift::Type error_type = var_decl->getInterfaceType ();
1002- CompilerType error_ast_type (error_type. getPointer () );
1004+ CompilerType error_ast_type = SwiftASTContext::GetCompilerType (error_type);
10031005 SwiftASTManipulatorBase::VariableMetadataSP error_metadata_sp (
10041006 new VariableMetadataError ());
10051007
0 commit comments