Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -530,8 +530,7 @@ void SwiftASTManipulator::FindVariableDeclarations(

size_t persistent_info_location = m_variables.size();

auto type = var_decl->getDeclContext()->mapTypeIntoContext(
var_decl->getInterfaceType());
auto type = var_decl->getTypeInContext();
m_variables.emplace_back(ToCompilerType({type.getPointer()}), name,
var_decl);
found_declarations.push_back(persistent_info_location);
Expand Down Expand Up @@ -859,8 +858,7 @@ GetPatternBindingForVarDecl(swift::VarDecl *var_decl,
}
}
}
swift::Type type = containing_context->mapTypeIntoContext(
var_decl->getInterfaceType());
swift::Type type = var_decl->getTypeInContext();
swift::TypedPattern *typed_pattern =
swift::TypedPattern::createImplicit(ast_context, named_pattern, type);

Expand Down Expand Up @@ -947,7 +945,7 @@ llvm::Expected<swift::Type> SwiftASTManipulator::GetSwiftTypeForVariable(
}

if (swift_type->hasArchetype())
swift_type = swift_type->mapTypeOutOfContext();
swift_type = swift_type->mapTypeOutOfEnvironment();

return {swift_type};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -992,7 +992,7 @@ MaterializeVariable(SwiftASTManipulatorBase::VariableInfo &variable,
"transformed type is empty");

actual_type =
ToCompilerType(transformed_type->mapTypeOutOfContext().getPointer());
ToCompilerType(transformed_type->mapTypeOutOfEnvironment().getPointer());
auto swift_ast_ctx =
actual_type.GetTypeSystem().dyn_cast_or_null<SwiftASTContext>();
if (!swift_ast_ctx)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,7 @@ swift::SILValue SwiftSILManipulator::emitLValueForVariable(
swift::LoadInst *pointer_to_variable =
m_builder.createLoad(null_loc, pointer_to_return_slot,
swift::LoadOwnershipQualifier::Trivial);
auto type = var->getDeclContext()->mapTypeIntoContext(
var->getInterfaceType());
auto type = var->getTypeInContext();
auto loweredType = converter.getLoweredRValueType(
swift::TypeExpansionContext::minimal(), type);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ SwiftLanguageRuntime::BindGenericTypeParametersRemoteAST(
llvm::expectedToStdOptional(swift_ast_ctx->GetSwiftType(base_type))
.value_or(swift::Type()));
if (target_swift_type->hasArchetype())
target_swift_type = target_swift_type->mapTypeOutOfContext().getPointer();
target_swift_type = target_swift_type->mapTypeOutOfEnvironment().getPointer();

ThreadSafeASTContext ast_ctx = swift_ast_ctx->GetASTContext();
if (!ast_ctx)
Expand Down
2 changes: 1 addition & 1 deletion lldb/source/Plugins/TypeSystem/Swift/SwiftASTContext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8390,7 +8390,7 @@ CompilerType SwiftASTContext::GetUnboundGenericType(opaque_compiler_type_t type,
llvm::ArrayRef<swift::GenericTypeParamType *> params =
generic_sig.getGenericParams();
swift::Type paramTy = params[idx];
return ToCompilerType({nominal_type_decl->mapTypeIntoContext(paramTy)
return ToCompilerType({nominal_type_decl->mapTypeIntoEnvironment(paramTy)
->castTo<swift::ArchetypeType>()});
}

Expand Down