Skip to content

Commit b2f627b

Browse files
committed
Assert that REPL result variables are in the typeref typesystem (NFC)
The non-REPL ResultVariable types are explicitly converted to the typeref typesystem before being being created.
1 parent fbc2eaa commit b2f627b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

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

Lines changed: 3 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()

0 commit comments

Comments
 (0)