mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
21 lines
526 B
Swift
21 lines
526 B
Swift
// RUN: %empty-directory(%t)
|
|
// RUN: %target-build-swift %s -emit-module -module-name Module0 -DSPI_DECLARING_MODULE -o %t/Module0.swiftmodule
|
|
// RUN: %target-build-swift %s -module-name Module1 -DSPI_IMPORTING_MODULE -emit-loaded-module-trace -o %t/spi_import -I %t
|
|
// RUN: %FileCheck %s < %t/Module1.trace.json
|
|
|
|
#if SPI_DECLARING_MODULE
|
|
|
|
@_spi(ForModule1)
|
|
public func f() {}
|
|
|
|
#endif
|
|
|
|
#if SPI_IMPORTING_MODULE
|
|
|
|
@_spi(ForModule1)
|
|
import Module0
|
|
|
|
#endif
|
|
|
|
// CHECK: "name":"Module0","path":"{{[^"]*}}","isImportedDirectly":true
|