Merge pull request #82320 from xedin/hide-solver-hacks-behind-a-flag

[ConstraintSystem] Guard all the performance hacks with a flag
This commit is contained in:
Pavel Yaskevich
2025-06-20 00:12:16 -07:00
committed by GitHub
13 changed files with 64 additions and 64 deletions

View File

@@ -3586,6 +3586,13 @@ public:
return Options.contains(ConstraintSystemFlags::ForCodeCompletion);
}
/// Check whether type-checker performance hacks has been explicitly
/// disabled by a flag.
bool performanceHacksEnabled() const {
return !getASTContext()
.TypeCheckerOpts.DisableConstraintSolverPerformanceHacks;
}
/// Log and record the application of the fix. Return true iff any
/// subsequent solution would be worse than the best known solution.
bool recordFix(ConstraintFix *fix, unsigned impact = 1);