@@ -155,7 +155,7 @@ struct ResultBuilder {
155
155
unsigned VarCounter = 0 ;
156
156
157
157
public:
158
- ResultBuilder (ConstraintSystem * CS, DeclContext *DC, Type builderType);
158
+ ResultBuilder (ConstraintSystem & CS, DeclContext *DC, Type builderType);
159
159
160
160
DeclContext *getDeclContext () const { return DC; }
161
161
@@ -996,32 +996,7 @@ struct AppliedBuilderTransform {
996
996
997
997
// / The version of the original body with result builder applied
998
998
// / as AST transformation.
999
- NullablePtr<BraceStmt> transformedBody;
1000
-
1001
- // / An expression whose value has been recorded for later use.
1002
- struct RecordedExpr {
1003
- // / The temporary value that captures the value of the expression, if
1004
- // / there is one.
1005
- VarDecl *temporaryVar;
1006
-
1007
- // / The expression that results from generating constraints with this
1008
- // / particular builder.
1009
- Expr *generatedExpr;
1010
- };
1011
-
1012
- // / A mapping from expressions whose values are captured by the builder
1013
- // / to information about the temporary variable capturing the
1014
- llvm::DenseMap<Expr *, RecordedExpr> capturedExprs;
1015
-
1016
- // / A mapping from statements to a pair containing the implicit variable
1017
- // / declaration that captures the result of that expression, and the
1018
- // / set of expressions that can be used to produce a value for that
1019
- // / variable.
1020
- llvm::DenseMap<Stmt *, std::pair<VarDecl *, llvm::TinyPtrVector<Expr *>>>
1021
- capturedStmts;
1022
-
1023
- // / The return expression, capturing the last value to be emitted.
1024
- Expr *returnExpr = nullptr ;
999
+ BraceStmt *transformedBody;
1025
1000
};
1026
1001
1027
1002
struct Score ;
@@ -6212,25 +6187,6 @@ bool isSIMDOperator(ValueDecl *value);
6212
6187
6213
6188
std::string describeGenericType (ValueDecl *GP, bool includeName = false );
6214
6189
6215
- // / Apply the given result builder transform within a specific solution
6216
- // / to produce the rewritten body.
6217
- // /
6218
- // / \param solution The solution to use during application, providing the
6219
- // / specific types for each type variable.
6220
- // / \param applied The applied builder transform.
6221
- // / \param body The body to transform
6222
- // / \param dc The context in which the transform occurs.
6223
- // / \param rewriteTarget Rewrites a target to its final, type-checked version.
6224
- // /
6225
- // / \returns the transformed body
6226
- BraceStmt *applyResultBuilderTransform (
6227
- const constraints::Solution &solution,
6228
- constraints::AppliedBuilderTransform applied, BraceStmt *body,
6229
- DeclContext *dc,
6230
- std::function<Optional<constraints::SyntacticElementTarget>(
6231
- constraints::SyntacticElementTarget)>
6232
- rewriteTarget);
6233
-
6234
6190
// / Whether the given parameter requires an argument.
6235
6191
bool parameterRequiresArgument (
6236
6192
ArrayRef<AnyFunctionType::Param> params,
0 commit comments