Temporarily revert changes on master-next to smooth merge

This commit is contained in:
Ben Langmuir
2019-11-05 13:32:20 -08:00
parent c18d38f9b5
commit 0cf3cfabbb

View File

@@ -95,7 +95,7 @@ void SplitterStep::computeFollowupSteps(
auto components = CG.computeConnectedComponents(CS.getTypeVariables()); auto components = CG.computeConnectedComponents(CS.getTypeVariables());
unsigned numComponents = components.size(); unsigned numComponents = components.size();
if (numComponents < 2) { if (numComponents < 2) {
steps.push_back(std::make_unique<ComponentStep>( steps.push_back(llvm::make_unique<ComponentStep>(
CS, 0, &CS.InactiveConstraints, Solutions)); CS, 0, &CS.InactiveConstraints, Solutions));
return; return;
} }
@@ -126,7 +126,7 @@ void SplitterStep::computeFollowupSteps(
// If there are no dependencies, build a normal component step. // If there are no dependencies, build a normal component step.
if (components[i].dependsOn.empty()) { if (components[i].dependsOn.empty()) {
steps.push_back(std::make_unique<ComponentStep>( steps.push_back(llvm::make_unique<ComponentStep>(
CS, solutionIndex, &Components[i], std::move(components[i]), CS, solutionIndex, &Components[i], std::move(components[i]),
PartialSolutions[solutionIndex])); PartialSolutions[solutionIndex]));
continue; continue;
@@ -141,7 +141,7 @@ void SplitterStep::computeFollowupSteps(
// Otherwise, build a dependent component "splitter" step, which // Otherwise, build a dependent component "splitter" step, which
// handles all combinations of incoming partial solutions. // handles all combinations of incoming partial solutions.
steps.push_back(std::make_unique<DependentComponentSplitterStep>( steps.push_back(llvm::make_unique<DependentComponentSplitterStep>(
CS, &Components[i], solutionIndex, std::move(components[i]), CS, &Components[i], solutionIndex, std::move(components[i]),
llvm::makeMutableArrayRef(PartialSolutions.get(), numComponents))); llvm::makeMutableArrayRef(PartialSolutions.get(), numComponents)));
} }
@@ -273,7 +273,7 @@ StepResult DependentComponentSplitterStep::take(bool prevFailed) {
} }
followup.push_back( followup.push_back(
std::make_unique<ComponentStep>(CS, Index, Constraints, Component, llvm::make_unique<ComponentStep>(CS, Index, Constraints, Component,
std::move(dependsOnSolutions), std::move(dependsOnSolutions),
Solutions)); Solutions));
} while (nextCombination(dependsOnSetsRef, indices)); } while (nextCombination(dependsOnSetsRef, indices));
@@ -333,11 +333,11 @@ StepResult ComponentStep::take(bool prevFailed) {
!bestBindings->FullyBound))) { !bestBindings->FullyBound))) {
// Produce a type variable step. // Produce a type variable step.
return suspend( return suspend(
std::make_unique<TypeVariableStep>(CS, *bestBindings, Solutions)); llvm::make_unique<TypeVariableStep>(CS, *bestBindings, Solutions));
} else if (disjunction) { } else if (disjunction) {
// Produce a disjunction step. // Produce a disjunction step.
return suspend( return suspend(
std::make_unique<DisjunctionStep>(CS, disjunction, Solutions)); llvm::make_unique<DisjunctionStep>(CS, disjunction, Solutions));
} }
// If there are no disjunctions or type variables to bind // If there are no disjunctions or type variables to bind