mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user