mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[CSStep] Conjunction: Give each conjunction step a fresh timer
Original timer cannot be used each expression in the multi-statement closure is type-checked independently.
This commit is contained in:
@@ -167,8 +167,10 @@ public:
|
||||
|
||||
|
||||
class ExpressionTimer {
|
||||
public:
|
||||
using AnchorType = llvm::PointerUnion<Expr *, ConstraintLocator *>;
|
||||
|
||||
private:
|
||||
AnchorType Anchor;
|
||||
ASTContext &Context;
|
||||
llvm::TimeRecord StartTime;
|
||||
@@ -188,6 +190,8 @@ public:
|
||||
|
||||
~ExpressionTimer();
|
||||
|
||||
AnchorType getAnchor() const { return Anchor; }
|
||||
|
||||
unsigned getWarnLimit() const {
|
||||
return Context.TypeCheckerOpts.WarnLongExpressionTypeChecking;
|
||||
}
|
||||
@@ -5681,6 +5685,8 @@ public:
|
||||
|
||||
bool attempt(ConstraintSystem &cs) const;
|
||||
|
||||
ConstraintLocator *getLocator() const { return Element->getLocator(); }
|
||||
|
||||
void print(llvm::raw_ostream &Out, SourceManager *SM) const {
|
||||
Out << "conjunction element ";
|
||||
Element->print(Out, SM);
|
||||
|
||||
Reference in New Issue
Block a user