mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Update determination of "too complex" expression to take time into account.
By default, end expression type checking after the elapsed process time is more than 60 seconds for the current expression. This threshold can be overridden by using -solver-expression-time-threshold=<seconds>. Resolves rdar://problem/32859654
This commit is contained in:
@@ -29,9 +29,7 @@ using namespace constraints;
|
||||
#define DEBUG_TYPE "ConstraintSystem"
|
||||
|
||||
ExpressionTimer::~ExpressionTimer() {
|
||||
llvm::TimeRecord endTime = llvm::TimeRecord::getCurrentTime(false);
|
||||
|
||||
auto elapsed = endTime.getProcessTime() - StartTime.getProcessTime();
|
||||
auto elapsed = getElapsedProcessTimeInFractionalSeconds();
|
||||
unsigned elapsedMS = static_cast<unsigned>(elapsed * 1000);
|
||||
|
||||
if (ShouldDump) {
|
||||
|
||||
Reference in New Issue
Block a user