[Frontend] Switch -interface-compiler-version to Version

`SWIFT_COMPILER_VERSION` has more than 4 components and it's
easier to use `Version` API over `VersionTuple` as well.
This commit is contained in:
Pavel Yaskevich
2024-11-18 10:09:55 -08:00
parent 26e888e45e
commit 7c8000b3a5
13 changed files with 55 additions and 28 deletions

View File

@@ -1,5 +1,17 @@
// RUN: %empty-directory(%t)
// Test some invalid uses
// RUN: not %target-swift-frontend -typecheck %s -interface-compiler-version A 2>&1 | %FileCheck %s --check-prefix=INVALID
// RUN: not %target-swift-frontend -typecheck %s -interface-compiler-version 6.0.0.0.1.6 2>&1 | %FileCheck %s --check-prefix=INVALID
// RUN: not %target-swift-frontend -typecheck %s -interface-compiler-version 6.xx 2>&1 | %FileCheck %s --check-prefix=INVALID
// INVALID: <unknown>:0: error: invalid value '{{.*}}' in '-interface-compiler-version {{.*}}'
// RUN: %target-typecheck-verify-swift %s -interface-compiler-version 6
// RUN: %target-typecheck-verify-swift %s -interface-compiler-version 6.1
// RUN: %target-typecheck-verify-swift %s -interface-compiler-version 6.1.0.0
// RUN: %target-typecheck-verify-swift %s -interface-compiler-version 6.1.0.0.0
/// Build the libraries.
// RUN: %target-swift-frontend %s \
// RUN: -module-name Lib \