Skip to content

Commit 954ca03

Browse files
author
git apple-llvm automerger
committed
Merge commit '526ee8b7ead9' from swift/release/5.9 into stable/20221013
2 parents 88cccd8 + 526ee8b commit 954ca03

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lldb/source/Plugins/ExpressionParser/Swift/SwiftExpressionParser.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -874,10 +874,12 @@ MaterializeVariable(SwiftASTManipulatorBase::VariableInfo &variable,
874874
needs_init = true;
875875

876876
Status error;
877-
878877
if (repl) {
879878
if (!variable.GetType().IsVoidType()) {
880879
auto &repl_mat = *llvm::cast<SwiftREPLMaterializer>(&materializer);
880+
assert(variable.GetType()
881+
.GetTypeSystem()
882+
.isa_and_nonnull<TypeSystemSwiftTypeRef>());
881883
offset = repl_mat.AddREPLResultVariable(
882884
variable.GetType(), variable.GetDecl(),
883885
is_result ? &user_expression.GetResultDelegate()
@@ -909,6 +911,8 @@ MaterializeVariable(SwiftASTManipulatorBase::VariableInfo &variable,
909911
ToCompilerType(transformed_type->mapTypeOutOfContext().getPointer());
910912
auto swift_ast_ctx =
911913
actual_type.GetTypeSystem().dyn_cast_or_null<SwiftASTContext>();
914+
if (!swift_ast_ctx)
915+
return {};
912916

913917
actual_type =
914918
swift_ast_ctx->GetTypeRefType(actual_type.GetOpaqueQualType());

0 commit comments

Comments
 (0)