Skip to content

Commit 8cdf7fb

Browse files
authored
Merge pull request #3365 from augusto2112/use-compiler-type-void
[lldb] Replace ast type direct usage with CompilerType to check for void
2 parents f2bff10 + 09ed7bc commit 8cdf7fb

File tree

1 file changed

+10
-12
lines changed

1 file changed

+10
-12
lines changed

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

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1051,18 +1051,16 @@ MaterializeVariable(SwiftASTManipulatorBase::VariableInfo &variable,
10511051
Status error;
10521052

10531053
if (repl) {
1054-
if (swift::Type swift_type = GetSwiftType(variable.GetType())) {
1055-
if (!swift_type->isVoid()) {
1056-
auto &repl_mat = *llvm::cast<SwiftREPLMaterializer>(&materializer);
1057-
if (is_result)
1058-
offset = repl_mat.AddREPLResultVariable(
1059-
variable.GetType(), variable.GetDecl(),
1060-
&user_expression.GetResultDelegate(), error);
1061-
else
1062-
offset = repl_mat.AddREPLResultVariable(
1063-
variable.GetType(), variable.GetDecl(),
1064-
&user_expression.GetErrorDelegate(), error);
1065-
}
1054+
if (!variable.GetType().IsVoidType()) {
1055+
auto &repl_mat = *llvm::cast<SwiftREPLMaterializer>(&materializer);
1056+
if (is_result)
1057+
offset = repl_mat.AddREPLResultVariable(
1058+
variable.GetType(), variable.GetDecl(),
1059+
&user_expression.GetResultDelegate(), error);
1060+
else
1061+
offset = repl_mat.AddREPLResultVariable(
1062+
variable.GetType(), variable.GetDecl(),
1063+
&user_expression.GetErrorDelegate(), error);
10661064
}
10671065
} else {
10681066
CompilerType actual_type = variable.GetType();

0 commit comments

Comments
 (0)