mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Back in December DougG added code to delay the formation of generic environments until all declarations from a particular module had been deserialized, to avoid circular dependencies caused by too-eager deserialization of protocol members. This worked great for fully-built modules, but still had some problems with module merging, the phase of multi-file compilation where the "partial" swiftmodules that correspond to each source file in a target are loaded and remitted as a single swiftmodule. Fix this by picking one of the partial swiftmodules as the representative one for delayed actions, and wait until deserialization is complete for /all/ of the serialized ASTs in the same target to form the generic environments. rdar://problem/30984417
9 lines
798 B
Swift
9 lines
798 B
Swift
// RUN: rm -rf %t && mkdir -p %t
|
|
|
|
// RUN: %target-swift-frontend -emit-module -module-name Multi -o %t/a.swiftmodule -primary-file %S/Inputs/circular-protocols/a.swift %S/Inputs/circular-protocols/b.swift %S/Inputs/circular-protocols/c.swift
|
|
// RUN: %target-swift-frontend -emit-module -module-name Multi -o %t/b.swiftmodule -primary-file %S/Inputs/circular-protocols/b.swift %S/Inputs/circular-protocols/a.swift %S/Inputs/circular-protocols/c.swift
|
|
// RUN: %target-swift-frontend -emit-module -module-name Multi -o %t/c.swiftmodule -primary-file %S/Inputs/circular-protocols/c.swift %S/Inputs/circular-protocols/a.swift %S/Inputs/circular-protocols/b.swift
|
|
|
|
// RUN: %target-swift-frontend -parse-as-library -emit-module -module-name Multi %t/a.swiftmodule %t/b.swiftmodule %t/c.swiftmodule -o %t
|
|
|