@@ -3163,14 +3163,6 @@ namespace {
31633163 llvm_unreachable (" Handled by the walker directly" );
31643164 }
31653165
3166- Type visitOneWayExpr (OneWayExpr *expr) {
3167- auto locator = CS.getConstraintLocator (expr);
3168- auto resultTypeVar = CS.createTypeVariable (locator, 0 );
3169- CS.addConstraint (ConstraintKind::OneWayEqual, resultTypeVar,
3170- CS.getType (expr->getSubExpr ()), locator);
3171- return resultTypeVar;
3172- }
3173-
31743166 Type visitTapExpr (TapExpr *expr) {
31753167 DeclContext *varDC = expr->getVar ()->getDeclContext ();
31763168 ASSERT (varDC != nullptr );
@@ -3333,7 +3325,6 @@ namespace {
33333325 JoinInout,
33343326 JoinMeta,
33353327 JoinNonexistent,
3336- OneWay,
33373328 };
33383329
33393330 static TypeOperation getTypeOperation (UnresolvedDotExpr *UDE,
@@ -3347,7 +3338,6 @@ namespace {
33473338
33483339 return llvm::StringSwitch<TypeOperation>(
33493340 UDE->getName ().getBaseIdentifier ().str ())
3350- .Case (" one_way" , TypeOperation::OneWay)
33513341 .Case (" type_join" , TypeOperation::Join)
33523342 .Case (" type_join_inout" , TypeOperation::JoinInout)
33533343 .Case (" type_join_meta" , TypeOperation::JoinMeta)
@@ -3361,7 +3351,6 @@ namespace {
33613351
33623352 switch (op) {
33633353 case TypeOperation::None:
3364- case TypeOperation::OneWay:
33653354 llvm_unreachable (
33663355 " We should have a valid type operation at this point!" );
33673356
@@ -3558,12 +3547,7 @@ namespace {
35583547 auto typeOperation =
35593548 ConstraintGenerator::getTypeOperation (UDE, CS.getASTContext ());
35603549
3561- if (typeOperation == ConstraintGenerator::TypeOperation::OneWay) {
3562- // For a one-way constraint, create the OneWayExpr node.
3563- auto *unaryArg = apply->getArgs ()->getUnlabeledUnaryExpr ();
3564- assert (unaryArg);
3565- expr = new (CS.getASTContext ()) OneWayExpr (unaryArg);
3566- } else if (typeOperation !=
3550+ if (typeOperation !=
35673551 ConstraintGenerator::TypeOperation::None) {
35683552 // Handle the Builtin.type_join* family of calls by replacing
35693553 // them with dot_self_expr of type_expr with the type being the
0 commit comments