@@ -350,11 +350,6 @@ class alignas(8) Expr : public ASTAllocated<Expr> {
350
350
IsObjC : 1
351
351
);
352
352
353
- SWIFT_INLINE_BITFIELD_FULL (PackExpansionExpr, Expr, 32 ,
354
- : NumPadBits,
355
- NumBindings : 32
356
- );
357
-
358
353
SWIFT_INLINE_BITFIELD_FULL (SequenceExpr, Expr, 32 ,
359
354
: NumPadBits,
360
355
NumElements : 32
@@ -3599,38 +3594,21 @@ class PackElementExpr final : public Expr {
3599
3594
// / that naturally accept a comma-separated list of values, including
3600
3595
// / call argument lists, the elements of a tuple value, and the source
3601
3596
// / of a for-in loop.
3602
- class PackExpansionExpr final : public Expr,
3603
- private llvm::TrailingObjects<PackExpansionExpr, PackElementExpr *> {
3604
- friend TrailingObjects;
3605
-
3597
+ class PackExpansionExpr final : public Expr {
3606
3598
Expr *PatternExpr;
3607
3599
SourceLoc DotsLoc;
3608
3600
GenericEnvironment *Environment;
3609
3601
3610
3602
PackExpansionExpr (Expr *patternExpr,
3611
- ArrayRef<PackElementExpr *> packElements,
3612
3603
SourceLoc dotsLoc,
3613
3604
GenericEnvironment *environment,
3614
3605
bool implicit, Type type)
3615
3606
: Expr(ExprKind::PackExpansion, implicit, type),
3616
- PatternExpr (patternExpr), DotsLoc(dotsLoc), Environment(environment) {
3617
- Bits.PackExpansionExpr .NumBindings = packElements.size ();
3618
- std::uninitialized_copy (packElements.begin (), packElements.end (),
3619
- getTrailingObjects<PackElementExpr *>());
3620
- }
3621
-
3622
- size_t numTrailingObjects (OverloadToken<PackElementExpr *>) const {
3623
- return getNumBindings ();
3624
- }
3625
-
3626
- MutableArrayRef<PackElementExpr *> getMutableBindings () {
3627
- return {getTrailingObjects<PackElementExpr *>(), getNumBindings ()};
3628
- }
3607
+ PatternExpr (patternExpr), DotsLoc(dotsLoc), Environment(environment) {}
3629
3608
3630
3609
public:
3631
3610
static PackExpansionExpr *create (ASTContext &ctx,
3632
3611
Expr *patternExpr,
3633
- ArrayRef<PackElementExpr *> packElements,
3634
3612
SourceLoc dotsLoc,
3635
3613
GenericEnvironment *environment,
3636
3614
bool implicit = false ,
@@ -3642,14 +3620,6 @@ class PackExpansionExpr final : public Expr,
3642
3620
PatternExpr = patternExpr;
3643
3621
}
3644
3622
3645
- unsigned getNumBindings () const {
3646
- return Bits.PackExpansionExpr .NumBindings ;
3647
- }
3648
-
3649
- ArrayRef<PackElementExpr *> getPackElements () {
3650
- return {getTrailingObjects<PackElementExpr *>(), getNumBindings ()};
3651
- }
3652
-
3653
3623
void getExpandedPacks (SmallVectorImpl<ASTNode> &packs);
3654
3624
3655
3625
GenericEnvironment *getGenericEnvironment () {
0 commit comments