26
26
#include " swift/AST/DeclContext.h"
27
27
#include " swift/AST/DeclNameLoc.h"
28
28
#include " swift/AST/FreestandingMacroExpansion.h"
29
- #include " swift/AST/FunctionRefKind .h"
29
+ #include " swift/AST/FunctionRefInfo .h"
30
30
#include " swift/AST/ProtocolConformanceRef.h"
31
31
#include " swift/AST/ThrownErrorDestination.h"
32
32
#include " swift/AST/TypeAlignments.h"
@@ -195,14 +195,14 @@ class alignas(8) Expr : public ASTAllocated<Expr> {
195
195
196
196
SWIFT_INLINE_BITFIELD (DeclRefExpr, Expr, 2 +2 +1 +1 ,
197
197
Semantics : 2 , // an AccessSemantics
198
- FunctionRefKind : 2 ,
198
+ FunctionRefInfo : 2 ,
199
199
IsImplicitlyAsync : 1 ,
200
200
IsImplicitlyThrows : 1
201
201
);
202
202
203
203
SWIFT_INLINE_BITFIELD (UnresolvedDeclRefExpr, Expr, 2 +2 ,
204
204
DeclRefKind : 2 ,
205
- FunctionRefKind : 2
205
+ FunctionRefInfo : 2
206
206
);
207
207
208
208
SWIFT_INLINE_BITFIELD (MemberRefExpr, LookupExpr, 2 ,
@@ -226,7 +226,7 @@ class alignas(8) Expr : public ASTAllocated<Expr> {
226
226
);
227
227
228
228
SWIFT_INLINE_BITFIELD (UnresolvedDotExpr, Expr, 2 ,
229
- FunctionRefKind : 2
229
+ FunctionRefInfo : 2
230
230
);
231
231
232
232
SWIFT_INLINE_BITFIELD_FULL (SubscriptExpr, LookupExpr, 2 ,
@@ -236,11 +236,11 @@ class alignas(8) Expr : public ASTAllocated<Expr> {
236
236
SWIFT_INLINE_BITFIELD_EMPTY (DynamicSubscriptExpr, DynamicLookupExpr);
237
237
238
238
SWIFT_INLINE_BITFIELD_FULL (UnresolvedMemberExpr, Expr, 2 ,
239
- FunctionRefKind : 2
239
+ FunctionRefInfo : 2
240
240
);
241
241
242
242
SWIFT_INLINE_BITFIELD (OverloadSetRefExpr, Expr, 2 ,
243
- FunctionRefKind : 2
243
+ FunctionRefInfo : 2
244
244
);
245
245
246
246
SWIFT_INLINE_BITFIELD (BooleanLiteralExpr, LiteralExpr, 1 ,
@@ -1231,9 +1231,9 @@ class DeclRefExpr : public Expr {
1231
1231
: Expr(ExprKind::DeclRef, Implicit, Ty), D(D), Loc(Loc),
1232
1232
implicitActorHopTarget (ActorIsolation::forUnspecified()) {
1233
1233
Bits.DeclRefExpr .Semantics = (unsigned ) semantics;
1234
- Bits.DeclRefExpr .FunctionRefKind =
1235
- static_cast <unsigned >(Loc.isCompound () ? FunctionRefKind ::Compound
1236
- : FunctionRefKind ::Unapplied);
1234
+ Bits.DeclRefExpr .FunctionRefInfo =
1235
+ static_cast <unsigned >(Loc.isCompound () ? FunctionRefInfo ::Compound
1236
+ : FunctionRefInfo ::Unapplied);
1237
1237
Bits.DeclRefExpr .IsImplicitlyAsync = false ;
1238
1238
Bits.DeclRefExpr .IsImplicitlyThrows = false ;
1239
1239
}
@@ -1300,13 +1300,13 @@ class DeclRefExpr : public Expr {
1300
1300
DeclNameLoc getNameLoc () const { return Loc; }
1301
1301
1302
1302
// / Retrieve the kind of function reference.
1303
- FunctionRefKind getFunctionRefKind () const {
1304
- return static_cast <FunctionRefKind >(Bits.DeclRefExpr .FunctionRefKind );
1303
+ FunctionRefInfo getFunctionRefInfo () const {
1304
+ return static_cast <FunctionRefInfo >(Bits.DeclRefExpr .FunctionRefInfo );
1305
1305
}
1306
1306
1307
1307
// / Set the kind of function reference.
1308
- void setFunctionRefKind (FunctionRefKind refKind) {
1309
- Bits.DeclRefExpr .FunctionRefKind = static_cast <unsigned >(refKind);
1308
+ void setFunctionRefInfo (FunctionRefInfo refKind) {
1309
+ Bits.DeclRefExpr .FunctionRefInfo = static_cast <unsigned >(refKind);
1310
1310
}
1311
1311
1312
1312
static bool classof (const Expr *E) {
@@ -1506,10 +1506,10 @@ class OverloadSetRefExpr : public Expr {
1506
1506
1507
1507
protected:
1508
1508
OverloadSetRefExpr (ExprKind Kind, ArrayRef<ValueDecl*> decls,
1509
- FunctionRefKind functionRefKind , bool Implicit, Type Ty)
1509
+ FunctionRefInfo functionRefInfo , bool Implicit, Type Ty)
1510
1510
: Expr(Kind, Implicit, Ty), Decls(decls) {
1511
- Bits.OverloadSetRefExpr .FunctionRefKind =
1512
- static_cast <unsigned >(functionRefKind );
1511
+ Bits.OverloadSetRefExpr .FunctionRefInfo =
1512
+ static_cast <unsigned >(functionRefInfo );
1513
1513
}
1514
1514
1515
1515
public:
@@ -1529,14 +1529,14 @@ class OverloadSetRefExpr : public Expr {
1529
1529
bool hasBaseObject () const ;
1530
1530
1531
1531
// / Retrieve the kind of function reference.
1532
- FunctionRefKind getFunctionRefKind () const {
1533
- return static_cast <FunctionRefKind >(
1534
- Bits.OverloadSetRefExpr .FunctionRefKind );
1532
+ FunctionRefInfo getFunctionRefInfo () const {
1533
+ return static_cast <FunctionRefInfo >(
1534
+ Bits.OverloadSetRefExpr .FunctionRefInfo );
1535
1535
}
1536
1536
1537
1537
// / Set the kind of function reference.
1538
- void setFunctionRefKind (FunctionRefKind refKind) {
1539
- Bits.OverloadSetRefExpr .FunctionRefKind = static_cast <unsigned >(refKind);
1538
+ void setFunctionRefInfo (FunctionRefInfo refKind) {
1539
+ Bits.OverloadSetRefExpr .FunctionRefInfo = static_cast <unsigned >(refKind);
1540
1540
}
1541
1541
1542
1542
static bool classof (const Expr *E) {
@@ -1552,9 +1552,9 @@ class OverloadedDeclRefExpr final : public OverloadSetRefExpr {
1552
1552
1553
1553
public:
1554
1554
OverloadedDeclRefExpr (ArrayRef<ValueDecl*> Decls, DeclNameLoc Loc,
1555
- FunctionRefKind functionRefKind ,
1555
+ FunctionRefInfo functionRefInfo ,
1556
1556
bool Implicit, Type Ty = Type())
1557
- : OverloadSetRefExpr(ExprKind::OverloadedDeclRef, Decls, functionRefKind ,
1557
+ : OverloadSetRefExpr(ExprKind::OverloadedDeclRef, Decls, functionRefInfo ,
1558
1558
Implicit, Ty),
1559
1559
Loc (Loc) {
1560
1560
}
@@ -1584,9 +1584,9 @@ class UnresolvedDeclRefExpr : public Expr {
1584
1584
: Expr(ExprKind::UnresolvedDeclRef, /* Implicit=*/ loc.isInvalid()),
1585
1585
Name (name), Loc(loc) {
1586
1586
Bits.UnresolvedDeclRefExpr .DeclRefKind = static_cast <unsigned >(refKind);
1587
- Bits.UnresolvedDeclRefExpr .FunctionRefKind =
1588
- static_cast <unsigned >(Loc.isCompound () ? FunctionRefKind ::Compound
1589
- : FunctionRefKind ::Unapplied);
1587
+ Bits.UnresolvedDeclRefExpr .FunctionRefInfo =
1588
+ static_cast <unsigned >(Loc.isCompound () ? FunctionRefInfo ::Compound
1589
+ : FunctionRefInfo ::Unapplied);
1590
1590
}
1591
1591
1592
1592
static UnresolvedDeclRefExpr *createImplicit (
@@ -1616,14 +1616,14 @@ class UnresolvedDeclRefExpr : public Expr {
1616
1616
}
1617
1617
1618
1618
// / Retrieve the kind of function reference.
1619
- FunctionRefKind getFunctionRefKind () const {
1620
- return static_cast <FunctionRefKind >(
1621
- Bits.UnresolvedDeclRefExpr .FunctionRefKind );
1619
+ FunctionRefInfo getFunctionRefInfo () const {
1620
+ return static_cast <FunctionRefInfo >(
1621
+ Bits.UnresolvedDeclRefExpr .FunctionRefInfo );
1622
1622
}
1623
1623
1624
1624
// / Set the kind of function reference.
1625
- void setFunctionRefKind (FunctionRefKind refKind) {
1626
- Bits.UnresolvedDeclRefExpr .FunctionRefKind = static_cast <unsigned >(refKind);
1625
+ void setFunctionRefInfo (FunctionRefInfo refKind) {
1626
+ Bits.UnresolvedDeclRefExpr .FunctionRefInfo = static_cast <unsigned >(refKind);
1627
1627
}
1628
1628
1629
1629
DeclNameLoc getNameLoc () const { return Loc; }
@@ -1901,7 +1901,7 @@ class UnresolvedMemberExpr final
1901
1901
bool implicit)
1902
1902
: Expr(ExprKind::UnresolvedMember, implicit), DotLoc(dotLoc),
1903
1903
NameLoc (nameLoc), Name(name) {
1904
- // FIXME: Really, we should be setting this to `FunctionRefKind ::Compound`
1904
+ // FIXME: Really, we should be setting this to `FunctionRefInfo ::Compound`
1905
1905
// if `NameLoc` is compound, but this would be a source break for cases like
1906
1906
// ```
1907
1907
// struct S {
@@ -1912,8 +1912,8 @@ class UnresolvedMemberExpr final
1912
1912
// ```
1913
1913
// Instead, we should store compound-ness as a separate bit from applied/
1914
1914
// unapplied.
1915
- Bits.UnresolvedMemberExpr .FunctionRefKind =
1916
- static_cast <unsigned >(FunctionRefKind ::Unapplied);
1915
+ Bits.UnresolvedMemberExpr .FunctionRefInfo =
1916
+ static_cast <unsigned >(FunctionRefInfo ::Unapplied);
1917
1917
}
1918
1918
1919
1919
DeclNameRef getName () const { return Name; }
@@ -1926,14 +1926,14 @@ class UnresolvedMemberExpr final
1926
1926
SourceLoc getEndLoc () const { return NameLoc.getSourceRange ().End ; }
1927
1927
1928
1928
// / Retrieve the kind of function reference.
1929
- FunctionRefKind getFunctionRefKind () const {
1930
- return static_cast <FunctionRefKind >(
1931
- Bits.UnresolvedMemberExpr .FunctionRefKind );
1929
+ FunctionRefInfo getFunctionRefInfo () const {
1930
+ return static_cast <FunctionRefInfo >(
1931
+ Bits.UnresolvedMemberExpr .FunctionRefInfo );
1932
1932
}
1933
1933
1934
1934
// / Set the kind of function reference.
1935
- void setFunctionRefKind (FunctionRefKind refKind) {
1936
- Bits.UnresolvedMemberExpr .FunctionRefKind = static_cast <unsigned >(refKind);
1935
+ void setFunctionRefInfo (FunctionRefInfo refKind) {
1936
+ Bits.UnresolvedMemberExpr .FunctionRefInfo = static_cast <unsigned >(refKind);
1937
1937
}
1938
1938
1939
1939
static bool classof (const Expr *E) {
@@ -2627,9 +2627,9 @@ class UnresolvedDotExpr : public Expr {
2627
2627
: Expr(ExprKind::UnresolvedDot, Implicit), SubExpr(subexpr),
2628
2628
DotLoc (dotloc), NameLoc(nameloc), Name(name),
2629
2629
OuterAlternatives(outerAlternatives) {
2630
- Bits.UnresolvedDotExpr .FunctionRefKind =
2631
- static_cast <unsigned >(NameLoc.isCompound () ? FunctionRefKind ::Compound
2632
- : FunctionRefKind ::Unapplied);
2630
+ Bits.UnresolvedDotExpr .FunctionRefInfo =
2631
+ static_cast <unsigned >(NameLoc.isCompound () ? FunctionRefInfo ::Compound
2632
+ : FunctionRefInfo ::Unapplied);
2633
2633
}
2634
2634
2635
2635
static UnresolvedDotExpr *createImplicit (
@@ -2692,13 +2692,13 @@ class UnresolvedDotExpr : public Expr {
2692
2692
}
2693
2693
2694
2694
// / Retrieve the kind of function reference.
2695
- FunctionRefKind getFunctionRefKind () const {
2696
- return static_cast <FunctionRefKind >(Bits.UnresolvedDotExpr .FunctionRefKind );
2695
+ FunctionRefInfo getFunctionRefInfo () const {
2696
+ return static_cast <FunctionRefInfo >(Bits.UnresolvedDotExpr .FunctionRefInfo );
2697
2697
}
2698
2698
2699
2699
// / Set the kind of function reference.
2700
- void setFunctionRefKind (FunctionRefKind refKind) {
2701
- Bits.UnresolvedDotExpr .FunctionRefKind = static_cast <unsigned >(refKind);
2700
+ void setFunctionRefInfo (FunctionRefInfo refKind) {
2701
+ Bits.UnresolvedDotExpr .FunctionRefInfo = static_cast <unsigned >(refKind);
2702
2702
}
2703
2703
2704
2704
static bool classof (const Expr *E) {
0 commit comments