File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -491,6 +491,9 @@ bool DisjunctionStep::shouldStopAt(const DisjunctionChoice &choice) const {
491
491
}
492
492
493
493
bool swift::isSIMDOperator (ValueDecl *value) {
494
+ if (!value)
495
+ return false ;
496
+
494
497
auto func = dyn_cast<FuncDecl>(value);
495
498
if (!func)
496
499
return false ;
@@ -556,10 +559,8 @@ bool DisjunctionStep::shortCircuitDisjunctionAt(
556
559
// If we have an operator from the SIMDOperators module, and the prior
557
560
// choice was not from the SIMDOperators module, we're done.
558
561
if (currentChoice->getKind () == ConstraintKind::BindOverload &&
559
- currentChoice->getOverloadChoice ().isDecl () &&
560
562
isSIMDOperator (currentChoice->getOverloadChoice ().getDecl ()) &&
561
563
lastSuccessfulChoice->getKind () == ConstraintKind::BindOverload &&
562
- lastSuccessfulChoice->getOverloadChoice ().isDecl () &&
563
564
!isSIMDOperator (lastSuccessfulChoice->getOverloadChoice ().getDecl ()) &&
564
565
!ctx.LangOpts .SolverEnableOperatorDesignatedTypes ) {
565
566
return true ;
Original file line number Diff line number Diff line change @@ -1473,7 +1473,7 @@ static ArrayRef<OverloadChoice> partitionSIMDOperators(
1473
1473
// Check whether we have any SIMD operators.
1474
1474
bool foundSIMDOperator = false ;
1475
1475
for (const auto &choice : choices) {
1476
- if (choice. isDecl () && isSIMDOperator (choice.getDecl ())) {
1476
+ if (isSIMDOperator (choice.getDecl ())) {
1477
1477
foundSIMDOperator = true ;
1478
1478
break ;
1479
1479
}
@@ -1485,8 +1485,7 @@ static ArrayRef<OverloadChoice> partitionSIMDOperators(
1485
1485
scratch.assign (choices.begin (), choices.end ());
1486
1486
std::stable_partition (scratch.begin (), scratch.end (),
1487
1487
[](const OverloadChoice &choice) {
1488
- return !choice.isDecl () ||
1489
- !isSIMDOperator (choice.getDecl ());
1488
+ return !isSIMDOperator (choice.getDecl ());
1490
1489
});
1491
1490
1492
1491
return scratch;
You can’t perform that action at this time.
0 commit comments