mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Name binding can trigger swiftinterface compilation, which creates a new ASTContext and runs a compilation job. If the compiler was run with -stats-output-dir, this could trigger an assertion because SharedTimer is not re-entrant. Fix this by replacing all direct uses of SharedTimer in the frontend with FrontendStatsTracer. SharedTimer is still used to _implement_ FrontendStatsTracer, however we can collapse some of the layers in the implementation later. Many of the usages should also become redundant over time once more code is converted over to requests.
7 lines
202 B
Swift
7 lines
202 B
Swift
// RUN: %empty-directory(%t)
|
|
// RUN: mkdir %t/stats
|
|
// RUN: mkdir %t/cache
|
|
// RUN: %target-swift-frontend -typecheck %s -I %S/Inputs -stats-output-dir %t/stats -module-cache-path %t/cache
|
|
|
|
import empty
|