Skip to content

Commit 8131794

Browse files
authored
Merge pull request #8954 from bnbarham/cherry-api-change-stable
[rebranch][Swift] Update for removal of ModuleDecl from various APIs
2 parents fe79348 + 6139ba5 commit 8131794

File tree

2 files changed

+5
-10
lines changed

2 files changed

+5
-10
lines changed

lldb/source/Plugins/LanguageRuntime/Swift/SwiftLanguageRuntimeRemoteAST.cpp

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -307,10 +307,6 @@ CompilerType SwiftLanguageRuntimeImpl::BindGenericTypeParametersRemoteAST(
307307
if (target_swift_type->hasArchetype())
308308
target_swift_type = target_swift_type->mapTypeOutOfContext().getPointer();
309309

310-
// FIXME: This is wrong, but it doesn't actually matter right now since
311-
// all conformances are always visible
312-
auto *module_decl = swift_ast_ctx->GetASTContext()->getStdlibModule();
313-
314310
// Replace opaque types with their underlying types when possible.
315311
swift::Mangle::ASTMangler mangler(true);
316312

@@ -406,7 +402,7 @@ CompilerType SwiftLanguageRuntimeImpl::BindGenericTypeParametersRemoteAST(
406402

407403
return result_type;
408404
},
409-
swift::LookUpConformanceInModule(module_decl),
405+
swift::LookUpConformanceInModule(),
410406
swift::SubstFlags::DesugarMemberTypes |
411407
swift::SubstFlags::SubstituteOpaqueArchetypes);
412408

@@ -434,7 +430,7 @@ CompilerType SwiftLanguageRuntimeImpl::BindGenericTypeParametersRemoteAST(
434430
swift_ast_ctx->GetSwiftType(target_concrete_type))
435431
.value_or(swift::Type());
436432
},
437-
swift::LookUpConformanceInModule(module_decl),
433+
swift::LookUpConformanceInModule(),
438434
swift::SubstFlags::DesugarMemberTypes);
439435
assert(target_swift_type);
440436

lldb/source/Plugins/TypeSystem/Swift/SwiftASTContext.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -604,7 +604,6 @@ class SwiftAllPayloadEnumDescriptor : public SwiftEnumDescriptor {
604604
LOG_PRINTF(GetLog(LLDBLog::Types), "tag_bits = %s",
605605
Dump(m_tag_bits).c_str());
606606

607-
auto module_ctx = enum_decl->getModuleContext();
608607
const bool has_payload = true;
609608
for (auto enum_case : elements_with_payload) {
610609
ConstString case_name(enum_case.decl->getBaseIdentifier().str());
@@ -615,7 +614,7 @@ class SwiftAllPayloadEnumDescriptor : public SwiftEnumDescriptor {
615614
CompilerType case_type;
616615
if (arg_type) {
617616
case_type = ToCompilerType(
618-
{swift_can_type->getTypeOfMember(module_ctx, case_decl, arg_type)
617+
{swift_can_type->getTypeOfMember(case_decl, arg_type)
619618
->getCanonicalType()
620619
.getPointer()});
621620
}
@@ -7313,7 +7312,7 @@ CompilerType SwiftASTContext::GetFieldAtIndex(opaque_compiler_type_t type,
73137312
*is_bitfield_ptr = false;
73147313

73157314
swift::Type child_swift_type = swift_can_type->getTypeOfMember(
7316-
nominal->getModuleContext(), property);
7315+
property);
73177316
return ToCompilerType(child_swift_type.getPointer());
73187317
}
73197318

@@ -7727,7 +7726,7 @@ llvm::Expected<CompilerType> SwiftASTContext::GetChildCompilerTypeAtIndex(
77277726
// Find the stored property with this index.
77287727
auto property = stored_properties[idx];
77297728
swift::Type child_swift_type = swift_can_type->getTypeOfMember(
7730-
nominal->getModuleContext(), property);
7729+
property);
77317730

77327731
CompilerType child_type = ToCompilerType(child_swift_type.getPointer());
77337732
child_name = property->getBaseName().userFacingName().str();

0 commit comments

Comments
 (0)