Skip to content

Commit 150ad99

Browse files
author
Harlan Haskins
committed
[ModuleInterfaces] Replace 'module file' with 'compiled module'
...only in diagnostics. And make the tests pass. rdar://49359734
1 parent 6d72977 commit 150ad99

13 files changed

+16
-16
lines changed

include/swift/AST/DiagnosticsSema.def

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -600,16 +600,16 @@ ERROR(sema_opening_import,Fatal,
600600
ERROR(serialization_load_failed,Fatal,
601601
"failed to load module %0", (Identifier))
602602
ERROR(serialization_malformed_module,Fatal,
603-
"malformed module file: %0", (StringRef))
603+
"malformed compiled module: %0", (StringRef))
604604
ERROR(serialization_module_too_new,Fatal,
605-
"module file was created by a newer version of the compiler: %0",
605+
"compiled module was created by a newer version of the compiler: %0",
606606
(StringRef))
607607
ERROR(serialization_module_language_version_mismatch,Fatal,
608608
"module compiled with Swift %0 cannot be imported by the Swift %1 "
609609
"compiler: %2",
610610
(StringRef, StringRef, StringRef))
611611
ERROR(serialization_module_too_old,Fatal,
612-
"module file was created by an older version of the compiler; "
612+
"compiled module was created by an older version of the compiler; "
613613
"rebuild %0 and try again: %1",
614614
(Identifier, StringRef))
615615
ERROR(serialization_missing_single_dependency,Fatal,

test/Driver/imported_modules_bridging_header.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44

55
// Confirm that the compiler does look for/find the bad overlay during a normal
66
// compilation, and thus validate that -emit-imported-modules doesn't.
7-
// CHECK: malformed module file: {{.*}}InvalidOverlay.swiftmodule
7+
// CHECK: malformed compiled module: {{.*}}InvalidOverlay.swiftmodule
88

99
// REQUIRES: objc_interop

test/Interpreter/SDK/missing_imports_repl.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ MKMapRectIsNull(x)
3333

3434

3535
import Corrupted_Module
36-
// CHECK-ERROR: error: malformed module file
36+
// CHECK-ERROR: error: malformed compiled module
3737

3838
"unreached"
3939
// CHECK-NOT: unreached

test/ParseableInterface/ModuleCache/force-module-loading-mode-archs.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@
9393

9494
import Lib
9595
// NO-SUCH-MODULE: [[@LINE-1]]:8: error: no such module 'Lib'
96-
// BAD-MODULE: [[@LINE-2]]:8: error: malformed module file: {{.*}}Lib.swiftmodule
96+
// BAD-MODULE: [[@LINE-2]]:8: error: malformed compiled module: {{.*}}Lib.swiftmodule
9797
// WRONG-ARCH: [[@LINE-3]]:8: error: could not find module 'Lib' for target '[[ARCH]]'; found: garbage
9898

9999
struct X {}

test/ParseableInterface/ModuleCache/force-module-loading-mode-framework.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@
9494

9595
import Lib
9696
// NO-SUCH-MODULE: [[@LINE-1]]:8: error: no such module 'Lib'
97-
// BAD-MODULE: [[@LINE-2]]:8: error: malformed module file: {{.*}}Lib.swiftmodule
97+
// BAD-MODULE: [[@LINE-2]]:8: error: malformed compiled module: {{.*}}Lib.swiftmodule
9898
// WRONG-ARCH: [[@LINE-3]]:8: error: could not find module 'Lib' for target '[[ARCH]]'; found: garbage
9999

100100
struct X {}

test/ParseableInterface/ModuleCache/force-module-loading-mode.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969

7070
import Lib
7171
// NO-SUCH-MODULE: [[@LINE-1]]:8: error: no such module 'Lib'
72-
// BAD-MODULE: [[@LINE-2]]:8: error: malformed module file: {{.*}}Lib.swiftmodule
72+
// BAD-MODULE: [[@LINE-2]]:8: error: malformed compiled module: {{.*}}Lib.swiftmodule
7373

7474
struct X {}
7575
let _: X = Lib.testValue

test/Serialization/load-arch-fallback-framework.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@
1515
// REQUIRES: CPU=armv7 || CPU=armv7k || CPU=armv7s
1616

1717
import empty
18-
// CHECK: :[[@LINE-1]]:8: error: malformed module file: {{.*}}arm.swiftmodule
18+
// CHECK: :[[@LINE-1]]:8: error: malformed compiled module: {{.*}}arm.swiftmodule

test/Serialization/load-arch-fallback.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@
1515
// REQUIRES: CPU=armv7 || CPU=armv7k || CPU=armv7s
1616

1717
import empty
18-
// CHECK: :[[@LINE-1]]:8: error: malformed module file: {{.*}}arm.swiftmodule
18+
// CHECK: :[[@LINE-1]]:8: error: malformed compiled module: {{.*}}arm.swiftmodule

test/Serialization/load-invalid-doc.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@
1414
// RUN: echo -n 'abcde' > %t/empty.swiftdoc
1515
// RUN: %target-swift-frontend -typecheck -I %t %s -verify -show-diagnostics-after-fatal
1616

17-
import empty // expected-error{{malformed module file}}
17+
import empty // expected-error{{malformed compiled module}}

test/Serialization/load-invalid.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// RUN: echo -n 'abcde' > %t/new_module.swiftmodule
1313
// RUN: %target-swift-frontend %s -typecheck -I %t -verify -show-diagnostics-after-fatal
1414

15-
import new_module // expected-error{{malformed module file}}
15+
import new_module // expected-error{{malformed compiled module}}
1616

1717
// malformed module files produce an empty module to avoid further errors.
1818
new_module.foo() // expected-error {{module 'new_module' has no member named 'foo'}}

test/Serialization/load-wrong-name-doc.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
// RUN: mv %t/empty.swiftdoc %t/empty2.swiftdoc
77
// RUN: %target-swift-frontend -typecheck -I %t %s -verify -show-diagnostics-after-fatal
88

9-
import empty2 // expected-error{{malformed module file}}
9+
import empty2 // expected-error{{malformed compiled module}}

test/Serialization/swiftdoc-versions.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@
1717
// RUN: cp %S/Inputs/swiftdoc-versions/empty-0.7.swiftdoc %t/empty.swiftdoc
1818
// RUN: %target-swift-frontend -typecheck -I %t %s -verify -show-diagnostics-after-fatal
1919

20-
import empty // expected-error{{malformed module file}}
20+
import empty // expected-error{{malformed compiled module}}

test/Serialization/version-mismatches.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
// RUN: not %target-swift-frontend %s -typecheck -I %S/Inputs/too-old-language/ -show-diagnostics-after-fatal 2>&1 | %FileCheck -check-prefix CHECK -check-prefix LANGUAGE %s
99

1010
import Library
11-
// TOO-OLD: :[[@LINE-1]]:8: error: module file was created by an older version of the compiler; rebuild 'Library' and try again: {{.*}}too-old/Library.swiftmodule{{$}}
12-
// TOO-NEW: :[[@LINE-2]]:8: error: module file was created by a newer version of the compiler: {{.*}}too-new/Library.swiftmodule{{$}}
11+
// TOO-OLD: :[[@LINE-1]]:8: error: compiled module was created by an older version of the compiler; rebuild 'Library' and try again: {{.*}}too-old/Library.swiftmodule{{$}}
12+
// TOO-NEW: :[[@LINE-2]]:8: error: compiled module was created by a newer version of the compiler: {{.*}}too-new/Library.swiftmodule{{$}}
1313

1414
// Update this line when the compiler version changes.
1515
// LANGUAGE: :[[@LINE-5]]:8: error: module compiled with Swift X.Y cannot be imported by the Swift 5.{{.+}} compiler: {{.*}}too-{{old|new}}-language/Library.swiftmodule{{$}}

0 commit comments

Comments
 (0)