Skip to content

Commit 718a0a0

Browse files
author
Harlan Haskins
committed
---
yaml --- r: 284158 b: refs/heads/swift-5.1-branch c: 9d25741 h: refs/heads/master
1 parent cafb064 commit 718a0a0

File tree

2 files changed

+25
-1
lines changed

2 files changed

+25
-1
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1242,7 +1242,7 @@ refs/heads/marcrasi-astverifier-disable: 3fac766a23a77ebd0640296bfd7fc116ea60a4e
12421242
refs/heads/revert-22227-a-tall-white-fountain-played: adfce60b2eaa54903ea189bed8a783bca609fa53
12431243
refs/heads/revert-22300-revert-22227-a-tall-white-fountain-played: 5f92040224df7dd4e618fdfb367349df64d8acad
12441244
refs/heads/swift-5.1-old-llvm-branch: 9cef8175146f25b72806154b8a0f4a3f52e3e400
1245-
refs/heads/swift-5.1-branch: 3c27d9de85c499699faba7f315c07807e64ce493
1245+
refs/heads/swift-5.1-branch: 9d25741228c1a29720814b3428c650416c5394c7
12461246
refs/tags/swift-4.2.2-RELEASE: e429d1f1aaf59e69d38207a96e56265c7f6fccec
12471247
refs/tags/swift-5.0-DEVELOPMENT-SNAPSHOT-2019-02-02-a: 3e5a03d32ff3b1e9af90d6c1198c14f938379a6e
12481248
refs/tags/swift-5.0-DEVELOPMENT-SNAPSHOT-2019-02-03-a: 4591c933063ddcb0d6cd6d0cdd01086b2f9b244d
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
// RUN: %empty-directory(%t/BuildDir)
2+
// RUN: %empty-directory(%t/SecondBuildDir/Lib.swiftmodule)
3+
// RUN: %empty-directory(%t/ModuleCache)
4+
5+
// RUN: echo 'public func showsUpInBothPlaces() {}' > %t/Lib.swift
6+
7+
// 1. Create a .swiftinterface file containing just one API, and put it inside a second build dir (without a .swiftmodule)
8+
// RUN: %target-swift-frontend -typecheck %t/Lib.swift -emit-parseable-module-interface-path %t/SecondBuildDir/Lib.swiftmodule/%target-cpu.swiftinterface
9+
10+
// 2. Add a new API to the module, and compile just the serialized version in the build dir.
11+
// RUN: echo 'public func onlyInTheCompiledModule() {}' >> %t/Lib.swift
12+
// RUN: %target-swift-frontend -emit-module %t/Lib.swift -o %t/BuildDir/Lib.swiftmodule -emit-parseable-module-interface-path %t/BuildDir/Lib.swiftinterface
13+
14+
// 3. Make sure when we compile this test file, we can access both APIs since we'll
15+
// load the compiled .swiftmodule instead of the .swiftinterface in the SDK.
16+
// RUN: %target-swift-frontend -typecheck %s -I %t/BuildDir -I %t/SecondBuildDir -module-cache-path %t/ModuleCache
17+
18+
// 4. Make sure we didn't compile any .swiftinterfaces into the module cache.
19+
// RUN: ls %t/ModuleCache | not grep 'swiftmodule'
20+
21+
import Lib
22+
23+
showsUpInBothPlaces()
24+
onlyInTheCompiledModule()

0 commit comments

Comments
 (0)