@@ -1451,9 +1451,8 @@ SpecializeAttr *SpecializeAttr::create(ASTContext &Ctx, SourceLoc atLoc,
1451
1451
1452
1452
1453
1453
// SWIFT_ENABLE_TENSORFLOW
1454
- DifferentiableAttr::DifferentiableAttr (ASTContext &context, bool implicit,
1455
- SourceLoc atLoc, SourceRange baseRange,
1456
- bool linear,
1454
+ DifferentiableAttr::DifferentiableAttr (bool implicit, SourceLoc atLoc,
1455
+ SourceRange baseRange, bool linear,
1457
1456
ArrayRef<ParsedAutoDiffParameter> params,
1458
1457
Optional<DeclNameWithLoc> jvp,
1459
1458
Optional<DeclNameWithLoc> vjp,
@@ -1488,8 +1487,8 @@ DifferentiableAttr::create(ASTContext &context, bool implicit,
1488
1487
TrailingWhereClause *clause) {
1489
1488
unsigned size = totalSizeToAlloc<ParsedAutoDiffParameter>(parameters.size ());
1490
1489
void *mem = context.Allocate (size, alignof (DifferentiableAttr));
1491
- return new (mem) DifferentiableAttr (context, implicit, atLoc, baseRange,
1492
- linear, parameters, std::move (jvp),
1490
+ return new (mem) DifferentiableAttr (implicit, atLoc, baseRange, linear ,
1491
+ parameters, std::move (jvp),
1493
1492
std::move (vjp), clause);
1494
1493
}
1495
1494
@@ -1570,48 +1569,45 @@ void DifferentiableAttr::print(llvm::raw_ostream &OS, const Decl *D,
1570
1569
1571
1570
// SWIFT_ENABLE_TENSORFLOW
1572
1571
DifferentiatingAttr::DifferentiatingAttr (
1573
- ASTContext &context, bool implicit, SourceLoc atLoc, SourceRange baseRange,
1574
- DeclNameWithLoc original, bool linear,
1575
- ArrayRef<ParsedAutoDiffParameter> params)
1572
+ bool implicit, SourceLoc atLoc, SourceRange baseRange,
1573
+ DeclNameWithLoc original, ArrayRef<ParsedAutoDiffParameter> params)
1576
1574
: DeclAttribute(DAK_Differentiating, atLoc, baseRange, implicit),
1577
- Original(std::move(original)), Linear(linear),
1578
- NumParsedParameters(params.size()) {
1575
+ Original(std::move(original)), NumParsedParameters(params.size()) {
1579
1576
std::copy (params.begin (), params.end (),
1580
1577
getTrailingObjects<ParsedAutoDiffParameter>());
1581
1578
}
1582
1579
1583
- DifferentiatingAttr::DifferentiatingAttr (
1584
- ASTContext &context, bool implicit, SourceLoc atLoc, SourceRange baseRange,
1585
- DeclNameWithLoc original, bool linear, IndexSubset *indices)
1580
+ DifferentiatingAttr::DifferentiatingAttr (bool implicit, SourceLoc atLoc,
1581
+ SourceRange baseRange,
1582
+ DeclNameWithLoc original,
1583
+ IndexSubset *indices)
1586
1584
: DeclAttribute(DAK_Differentiating, atLoc, baseRange, implicit),
1587
- Original(std::move(original)), Linear(linear), ParameterIndices(indices) {
1588
- }
1585
+ Original(std::move(original)), ParameterIndices(indices) {}
1589
1586
1590
1587
DifferentiatingAttr *
1591
- DifferentiatingAttr::create (ASTContext &context, bool implicit,
1592
- SourceLoc atLoc, SourceRange baseRange,
1593
- DeclNameWithLoc original, bool linear,
1588
+ DifferentiatingAttr::create (ASTContext &context, bool implicit, SourceLoc atLoc,
1589
+ SourceRange baseRange, DeclNameWithLoc original,
1594
1590
ArrayRef<ParsedAutoDiffParameter> params) {
1595
1591
unsigned size = totalSizeToAlloc<ParsedAutoDiffParameter>(params.size ());
1596
1592
void *mem = context.Allocate (size, alignof (DifferentiatingAttr));
1597
- return new (mem) DifferentiatingAttr (context, implicit, atLoc, baseRange,
1598
- std::move (original), linear, params);
1593
+ return new (mem) DifferentiatingAttr (implicit, atLoc, baseRange,
1594
+ std::move (original), params);
1599
1595
}
1600
1596
1601
- DifferentiatingAttr *
1602
- DifferentiatingAttr::create (ASTContext &context, bool implicit,
1603
- SourceLoc atLoc, SourceRange baseRange,
1604
- DeclNameWithLoc original, bool linear ,
1605
- IndexSubset *indices) {
1597
+ DifferentiatingAttr *DifferentiatingAttr::create (ASTContext &context,
1598
+ bool implicit, SourceLoc atLoc ,
1599
+ SourceRange baseRange,
1600
+ DeclNameWithLoc original ,
1601
+ IndexSubset *indices) {
1606
1602
void *mem = context.Allocate (sizeof (DifferentiatingAttr),
1607
1603
alignof (DifferentiatingAttr));
1608
- return new (mem) DifferentiatingAttr (context, implicit, atLoc, baseRange,
1609
- std::move (original), linear, indices);
1604
+ return new (mem) DifferentiatingAttr (implicit, atLoc, baseRange,
1605
+ std::move (original), indices);
1610
1606
}
1611
1607
1612
- TransposingAttr::TransposingAttr (ASTContext &context, bool implicit ,
1613
- SourceLoc atLoc, SourceRange baseRange ,
1614
- TypeRepr *baseType, DeclNameWithLoc original,
1608
+ TransposingAttr::TransposingAttr (bool implicit, SourceLoc atLoc ,
1609
+ SourceRange baseRange, TypeRepr *baseType ,
1610
+ DeclNameWithLoc original,
1615
1611
ArrayRef<ParsedAutoDiffParameter> params)
1616
1612
: DeclAttribute(DAK_Transposing, atLoc, baseRange, implicit),
1617
1613
BaseType(baseType), Original(std::move(original)),
@@ -1620,10 +1616,9 @@ TransposingAttr::TransposingAttr(ASTContext &context, bool implicit,
1620
1616
getTrailingObjects<ParsedAutoDiffParameter>());
1621
1617
}
1622
1618
1623
- TransposingAttr::TransposingAttr (ASTContext &context, bool implicit,
1624
- SourceLoc atLoc, SourceRange baseRange,
1625
- TypeRepr *baseType, DeclNameWithLoc original,
1626
- IndexSubset *indices)
1619
+ TransposingAttr::TransposingAttr (bool implicit, SourceLoc atLoc,
1620
+ SourceRange baseRange, TypeRepr *baseType,
1621
+ DeclNameWithLoc original, IndexSubset *indices)
1627
1622
: DeclAttribute(DAK_Transposing, atLoc, baseRange, implicit),
1628
1623
BaseType(baseType), Original(std::move(original)),
1629
1624
ParameterIndices(indices) {}
@@ -1635,8 +1630,8 @@ TransposingAttr::create(ASTContext &context, bool implicit, SourceLoc atLoc,
1635
1630
ArrayRef<ParsedAutoDiffParameter> params) {
1636
1631
unsigned size = totalSizeToAlloc<ParsedAutoDiffParameter>(params.size ());
1637
1632
void *mem = context.Allocate (size, alignof (TransposingAttr));
1638
- return new (mem) TransposingAttr (context, implicit, atLoc, baseRange,
1639
- baseType, std::move (original), params);
1633
+ return new (mem) TransposingAttr (implicit, atLoc, baseRange, baseType ,
1634
+ std::move (original), params);
1640
1635
}
1641
1636
1642
1637
TransposingAttr *
@@ -1646,8 +1641,8 @@ TransposingAttr::create(ASTContext &context, bool implicit, SourceLoc atLoc,
1646
1641
IndexSubset *indices) {
1647
1642
void *mem =
1648
1643
context.Allocate (sizeof (TransposingAttr), alignof (TransposingAttr));
1649
- return new (mem) TransposingAttr (context, implicit, atLoc, baseRange,
1650
- baseType, std::move (original), indices);
1644
+ return new (mem) TransposingAttr (implicit, atLoc, baseRange, baseType ,
1645
+ std::move (original), indices);
1651
1646
}
1652
1647
1653
1648
ImplementsAttr::ImplementsAttr (SourceLoc atLoc, SourceRange range,
0 commit comments