Files
swift-mirror/test/Migrator/no_ast_passes_after_swift4.swift
Michael Gottesman af25b6764c [swift-stage2] Point the API migrator at the correct directory when building/testing against a host toolchain.
This involved adding a new substitution called %api_diff_data_dir that when
building against a host toolchain, looks in the host toolchain (next to swiftc)
rather than in the resource dir. The reason why I need to do this is this allows
me to perform a stdlib stage2 build without needing to build swift itself.

The only interesting changes here are that I had to add %api_diff_data_dir to
a bunch of normal/expected tests and also add %api_diff_data_dir's length to the
offsets in rdar31892850.swift.
2021-08-12 11:50:04 -07:00

10 lines
648 B
Swift

// REQUIRES: objc_interop
// RUN: %empty-directory(%t) && %target-swift-frontend -c -update-code -primary-file %s -F %S/mock-sdk -emit-migrated-file-path %t/no_ast_passes_after_swift4.swift.result -emit-remap-file-path %t/no_ast_passes_after_swift4.swift.remap -o /dev/null -swift-version 4.2 %api_diff_data_dir
// RUN: diff -u %S/no_ast_passes_after_swift4.swift.expected %t/no_ast_passes_after_swift4.swift.result
// RUN: %target-swift-frontend -typecheck -F %S/mock-sdk -swift-version 4 %t/no_ast_passes_after_swift4.swift.result %api_diff_data_dir
import Bar
func foo() -> FooComparisonResult {
return FooComparisonResult.orderedAscending
}