mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Preload standard library in ModuleInterfaceBuilder
Previously, when the standard library module interface was broken, Swift would try to rebuild it repeatedly during -compile-module-from-interface jobs because `ASTContext::getStdlibModule()` would try to load the standard library again each time it was called. This led to extremely slow compilations that repeatedly emitted the same errors. To avoid this, we make ModuleInterfaceBuilder try to load the standard library right away and bail out if it can’t. Fixes rdar://75669548.
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
// swift-interface-format-version: 1.0
|
||||
// swift-module-flags: -target x86_64-apple-macos10.9 -module-name Swift -parse-stdlib
|
||||
|
||||
// If the test fails, this error will be emitted twice, not once.
|
||||
// expected-error@-4 {{failed to build module 'Swift' for importation due to the errors above}}
|
||||
|
||||
public struct BadType {
|
||||
public var property: UndeclaredType { get set } // expected-error {{cannot find type 'UndeclaredType' in scope}}
|
||||
}
|
||||
Reference in New Issue
Block a user