Skip to content

Commit eb79a08

Browse files
committed
(wip) update comparable implementations to match new internal apis
1 parent ed2552a commit eb79a08

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

lib/Sema/DerivedConformanceComparable.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ static GuardStmt *returnComparisonIfNotEqualGuard(ASTContext &C,
4646
// First, generate the statement for the body of the guard.
4747
// return lhs < rhs
4848
auto ltFuncExpr = new (C) UnresolvedDeclRefExpr(
49-
DeclName(C.getIdentifier("<")), DeclRefKind::BinaryOperator,
49+
DeclNameRef(C.Id_LessThanOperator), DeclRefKind::BinaryOperator,
5050
DeclNameLoc());
5151
auto ltArgsTuple = TupleExpr::create(C, SourceLoc(),
5252
{ lhsExpr, rhsExpr },
@@ -60,7 +60,7 @@ static GuardStmt *returnComparisonIfNotEqualGuard(ASTContext &C,
6060
// Next, generate the condition being checked.
6161
// lhs == rhs
6262
auto cmpFuncExpr = new (C) UnresolvedDeclRefExpr(
63-
DeclName(C.getIdentifier("==")), DeclRefKind::BinaryOperator,
63+
DeclNameRef(C.Id_EqualsOperator), DeclRefKind::BinaryOperator,
6464
DeclNameLoc());
6565
auto cmpArgsTuple = TupleExpr::create(C, SourceLoc(),
6666
{ lhsExpr, rhsExpr },
@@ -202,8 +202,8 @@ deriveBodyComparable_enum_hasAssociatedValues_lt(AbstractFunctionDecl *ltDecl, v
202202
auto lhsSubpattern = enumElementPayloadSubpattern(elt, 'l', ltDecl,
203203
lhsPayloadVars);
204204
auto lhsElemPat = new (C) EnumElementPattern(TypeLoc::withoutLoc(enumType),
205-
SourceLoc(), SourceLoc(),
206-
Identifier(), elt,
205+
SourceLoc(), DeclNameLoc(),
206+
DeclNameRef(), elt,
207207
lhsSubpattern);
208208
lhsElemPat->setImplicit();
209209

@@ -212,8 +212,8 @@ deriveBodyComparable_enum_hasAssociatedValues_lt(AbstractFunctionDecl *ltDecl, v
212212
auto rhsSubpattern = enumElementPayloadSubpattern(elt, 'r', ltDecl,
213213
rhsPayloadVars);
214214
auto rhsElemPat = new (C) EnumElementPattern(TypeLoc::withoutLoc(enumType),
215-
SourceLoc(), SourceLoc(),
216-
Identifier(), elt,
215+
SourceLoc(), DeclNameLoc(),
216+
DeclNameRef(), elt,
217217
rhsSubpattern);
218218
rhsElemPat->setImplicit();
219219

0 commit comments

Comments
 (0)