Skip to content

Commit e4859f1

Browse files
committed
---
yaml --- r: 293862 b: refs/heads/tensorflow c: 3eff026 h: refs/heads/master
1 parent 6d343bb commit e4859f1

File tree

6 files changed

+42
-17
lines changed

6 files changed

+42
-17
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -816,7 +816,7 @@ refs/tags/swift-DEVELOPMENT-SNAPSHOT-2018-04-25-a: 22f738a831d43aff2b9c9773bcb65
816816
refs/tags/swift-DEVELOPMENT-SNAPSHOT-2018-05-08-a: 7d98cc16689baba5c8a3b90a9329bdcc1a12b4e9
817817
refs/heads/cherr42: a566ad54b073c2c56ac0a705d0a5bed9743135a5
818818
"refs/heads/codable_test_comment_fix": fc8f6824f7f347e1e8db55bff62db385c5728b5a
819-
refs/heads/tensorflow: 73b7185a3d5b4b6253a8206cf32336cf87df8f89
819+
refs/heads/tensorflow: 3eff026bbff634e7d79fd214335f520a342dbc1a
820820
refs/tags/swift-4.1-DEVELOPMENT-SNAPSHOT-2018-05-11-a: 8126fd7a652e2f70ad6d76505239e34fb2ef3e1a
821821
refs/tags/swift-4.1-DEVELOPMENT-SNAPSHOT-2018-05-12-a: b3fd3dd84df6717f2e2e9df58c6d7e99fed57086
822822
refs/tags/swift-4.1-DEVELOPMENT-SNAPSHOT-2018-05-13-a: 71135119579039dc321c5f65d870050fe36efda2

branches/tensorflow/include/swift/AST/DiagnosticsFrontend.def

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,9 @@ WARNING(warn_unsupported_module_interface_swift_version,none,
265265
"module interfaces are only supported with Swift language version 5 "
266266
"or later (currently using -swift-version %0)",
267267
(StringRef))
268+
WARNING(warn_unsupported_module_interface_library_evolution,none,
269+
"module interfaces are only supported with -enable-library-evolution",
270+
())
268271
ERROR(error_extracting_version_from_module_interface,none,
269272
"error extracting version from module interface", ())
270273
ERROR(unsupported_version_of_module_interface,none,

branches/tensorflow/lib/FrontendTool/FrontendTool.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -373,6 +373,10 @@ printParseableInterfaceIfNeeded(StringRef outputPath,
373373
diag::warn_unsupported_module_interface_swift_version,
374374
LangOpts.isSwiftVersionAtLeast(4, 2) ? "4.2" : "4");
375375
}
376+
if (M->getResilienceStrategy() != ResilienceStrategy::Resilient) {
377+
diags.diagnose(SourceLoc(),
378+
diag::warn_unsupported_module_interface_library_evolution);
379+
}
376380
return withOutputFile(diags, outputPath,
377381
[M, Opts](raw_ostream &out) -> bool {
378382
return swift::emitParseableInterface(out, Opts, M);

branches/tensorflow/test/ParseableInterface/imports.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// RUN: %empty-directory(%t)
22
// RUN: %target-swift-frontend -emit-module -o %t/empty.swiftmodule %S/../Inputs/empty.swift
3-
// RUN: %target-swift-frontend -typecheck -emit-parseable-module-interface-path - %s %S/Inputs/imports-other.swift -I %S/Inputs/imports-clang-modules/ -I %t -verify -swift-version 5 | %FileCheck -implicit-check-not BAD %s
3+
// RUN: %target-swift-frontend -typecheck -emit-parseable-module-interface-path - %s %S/Inputs/imports-other.swift -I %S/Inputs/imports-clang-modules/ -I %t -verify -swift-version 5 -enable-library-evolution | %FileCheck -implicit-check-not BAD %s
44

55

66
@_exported import empty

branches/tensorflow/test/ParseableInterface/swift-version.swift

Lines changed: 0 additions & 15 deletions
This file was deleted.
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
// RUN: %empty-directory(%t)
2+
// RUN: %target-swift-frontend -typecheck -emit-parseable-module-interface-path %t/empty.swiftinterface %s -swift-version 4 2>&1 | %FileCheck -DVERSION=4 %s
3+
// RUN: ls %t/empty.swiftinterface
4+
5+
// RUN: %empty-directory(%t)
6+
// RUN: %target-swift-frontend -typecheck -emit-parseable-module-interface-path %t/empty.swiftinterface %s -swift-version 4.2 2>&1 | %FileCheck -DVERSION=4.2 %s
7+
// RUN: ls %t/empty.swiftinterface
8+
9+
// RUN: %empty-directory(%t)
10+
// RUN: %target-swift-frontend -typecheck -emit-parseable-module-interface-path %t/empty.swiftinterface %s -swift-version 4.2 -enable-library-evolution 2>&1 | %FileCheck -check-prefix=CHECK-VERSION-ONLY -DVERSION=4.2 %s
11+
// RUN: ls %t/empty.swiftinterface
12+
13+
// RUN: %empty-directory(%t)
14+
// RUN: %target-swift-frontend -typecheck -emit-parseable-module-interface-path %t/empty.swiftinterface %s -swift-version 5 2>&1 | %FileCheck -check-prefix=CHECK-EVOLUTION-ONLY %s
15+
// RUN: ls %t/empty.swiftinterface
16+
17+
// RUN: %empty-directory(%t)
18+
// RUN: %target-swift-frontend -typecheck -emit-parseable-module-interface-path %t/empty.swiftinterface %s -swift-version 5 -enable-library-evolution 2>&1 | %FileCheck -check-prefix=NEGATIVE -allow-empty %s
19+
// RUN: ls %t/empty.swiftinterface
20+
21+
// CHECK-DAG: warning: module interfaces are only supported with Swift language version 5 or later (currently using -swift-version [[VERSION]])
22+
// CHECK-DAG: warning: module interfaces are only supported with -enable-library-evolution
23+
24+
// CHECK-VERSION-ONLY-NOT: warning:
25+
// CHECK-VERSION-ONLY: warning: module interfaces are only supported with Swift language version 5 or later (currently using -swift-version [[VERSION]])
26+
// CHECK-VERSION-ONLY-NOT: warning:
27+
28+
// CHECK-EVOLUTION-ONLY-NOT: warning:
29+
// CHECK-EVOLUTION-ONLY: warning: module interfaces are only supported with -enable-library-evolution
30+
// CHECK-EVOLUTION-ONLY-NOT: warning:
31+
32+
// NEGATIVE-NOT: warning:
33+
// NEGATIVE-NOT: error:

0 commit comments

Comments
 (0)