File tree Expand file tree Collapse file tree 2 files changed +3
-24
lines changed Expand file tree Collapse file tree 2 files changed +3
-24
lines changed Original file line number Diff line number Diff line change @@ -1466,15 +1466,6 @@ struct PotentialThrowSite {
14661466
14671467 // / The locator that specifies where the throwing operation occurs.
14681468 ConstraintLocator *locator;
1469-
1470- friend bool operator ==(const PotentialThrowSite& lhs, const PotentialThrowSite &rhs) {
1471- return lhs.kind == rhs.kind && lhs.type .getPointer () == rhs.type .getPointer () &&
1472- lhs.locator == rhs.locator ;
1473- }
1474-
1475- friend bool operator !=(const PotentialThrowSite& lhs, const PotentialThrowSite &rhs) {
1476- return !(lhs == rhs);
1477- }
14781469};
14791470
14801471// / A complete solution to a constraint system.
Original file line number Diff line number Diff line change @@ -353,21 +353,9 @@ void ConstraintSystem::applySolution(const Solution &solution) {
353353 setCaseLabelItemInfo (info.first , info.second );
354354 }
355355
356- if (!potentialThrowSites.empty () && !solution.potentialThrowSites .empty ()) {
357- DenseMap<void *, std::vector<PotentialThrowSite>> known;
358- for (const auto &throwSite : potentialThrowSites) {
359- known[throwSite.first .getOpaqueValue ()].push_back (throwSite.second );
360- }
361-
362- for (const auto &throwSite : solution.potentialThrowSites ) {
363- auto &sites = known[throwSite.first .getOpaqueValue ()];
364- if (std::find (sites.begin (), sites.end (), throwSite.second ) != sites.end ())
365- continue ;
366-
367- sites.push_back (throwSite.second );
368- potentialThrowSites.push_back (throwSite);
369- }
370- }
356+ potentialThrowSites.insert (potentialThrowSites.end (),
357+ solution.potentialThrowSites .begin (),
358+ solution.potentialThrowSites .end ());
371359
372360 for (auto param : solution.isolatedParams ) {
373361 isolatedParams.insert (param);
You can’t perform that action at this time.
0 commit comments