mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Keep track of the locations of the element names in a TupleExpr.
As part of this, use tail allocation to reduce the memory footprint of TupleExprs. Use factory methods to make it easier to construct. I'll be using this information in a follow-on patch. SourceKit probably wants it as well. Swift SVN r17129
This commit is contained in:
@@ -626,12 +626,7 @@ static FuncDecl *makeOptionSetGetLogicValueMethod(StructDecl *optionSetDecl,
|
||||
auto neRef = getOperatorRef(C, C.Id_NotEqualsOperator);
|
||||
|
||||
Expr *args[] = {valueRef, zero};
|
||||
auto argsTuple = new (C) TupleExpr(SourceLoc(),
|
||||
C.AllocateCopy(args),
|
||||
nullptr,
|
||||
SourceLoc(),
|
||||
/*trailingClosure*/ false,
|
||||
/*implicit*/ true);
|
||||
auto argsTuple = TupleExpr::createImplicit(C, args, { });
|
||||
auto apply = new (C) BinaryExpr(neRef, argsTuple, /*implicit*/ true);
|
||||
auto ret = new (C) ReturnStmt(SourceLoc(), apply);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user