Skip to content

Commit 6a1be02

Browse files
authored
Merge pull request #19727 from jrose-apple/emit-parseable-module-interface
[Driver] Expose -emit-parseable-module-interface[-path]
2 parents ab980ff + 45557ee commit 6a1be02

26 files changed

+79
-50
lines changed

cmake/modules/SwiftSource.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -501,7 +501,7 @@ function(_compile_swift_files
501501
COMMAND
502502
"${PYTHON_EXECUTABLE}" "${line_directive_tool}" "@${file_path}" --
503503
"${swift_compiler_tool}" "-emit-module" "-o" "${module_file}"
504-
"-experimental-emit-interface" ${swift_flags} "@${file_path}"
504+
"-emit-parseable-module-interface" ${swift_flags} "@${file_path}"
505505
${command_touch_module_outputs}
506506
OUTPUT ${module_outputs}
507507
DEPENDS

include/swift/AST/DiagnosticsDriver.def

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,9 @@ ERROR(error_unknown_target,none,
8484

8585
ERROR(error_framework_bridging_header,none,
8686
"using bridging headers with framework targets is unsupported", ())
87+
ERROR(error_bridging_header_parseable_interface,none,
88+
"using bridging headers with parseable module interfaces is unsupported",
89+
())
8790

8891
ERROR(error_i_mode,none,
8992
"the flag '-i' is no longer required and has been removed; "

include/swift/Option/FrontendOptions.td

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,10 @@ def emit_fixits_path
6363
: Separate<["-"], "emit-fixits-path">, MetaVarName<"<path>">,
6464
HelpText<"Output compiler fixits as source edits to <path>">;
6565

66+
// For transition purposes.
6667
def emit_interface_path
67-
: Separate<["-"], "emit-interface-path">, MetaVarName<"<path>">,
68-
HelpText<"Output parseable interface file to <path>">;
68+
: Separate<["-"], "emit-interface-path">,
69+
Alias<emit_parseable_module_interface_path>;
6970

7071
def tbd_install_name
7172
: Separate<["-"], "tbd-install_name">, MetaVarName<"<path>">,

include/swift/Option/Options.td

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -300,9 +300,15 @@ def emit_module_path_EQ : Joined<["-"], "emit-module-path=">,
300300
ArgumentIsPath]>,
301301
Alias<emit_module_path>;
302302

303-
def experimental_emit_interface : Flag<["-"], "experimental-emit-interface">,
304-
Flags<[NoInteractiveOption, HelpHidden]>,
305-
HelpText<"Test out the parseable interfaces feature">;
303+
def emit_parseable_module_interface :
304+
Flag<["-"], "emit-parseable-module-interface">,
305+
Flags<[NoInteractiveOption, DoesNotAffectIncrementalBuild]>,
306+
HelpText<"Output parseable interface file">;
307+
def emit_parseable_module_interface_path :
308+
Separate<["-"], "emit-parseable-module-interface-path">,
309+
Flags<[FrontendOption, NoInteractiveOption, DoesNotAffectIncrementalBuild,
310+
ArgumentIsPath]>,
311+
MetaVarName<"<path>">, HelpText<"Output parseable interface file to <path>">;
306312

307313
def emit_objc_header : Flag<["-"], "emit-objc-header">,
308314
Flags<[FrontendOption, NoInteractiveOption, DoesNotAffectIncrementalBuild]>,

lib/Driver/Driver.cpp

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -121,9 +121,15 @@ ArrayRef<const char *> Driver::getArgsWithoutProgramNameAndDriverMode(
121121

122122
static void validateBridgingHeaderArgs(DiagnosticEngine &diags,
123123
const ArgList &args) {
124-
if (args.hasArgNoClaim(options::OPT_import_underlying_module) &&
125-
args.hasArgNoClaim(options::OPT_import_objc_header)) {
124+
if (!args.hasArgNoClaim(options::OPT_import_objc_header))
125+
return;
126+
127+
if (args.hasArgNoClaim(options::OPT_import_underlying_module))
126128
diags.diagnose({}, diag::error_framework_bridging_header);
129+
130+
if (args.hasArgNoClaim(options::OPT_emit_parseable_module_interface,
131+
options::OPT_emit_parseable_module_interface_path)) {
132+
diags.diagnose({}, diag::error_bridging_header_parseable_interface);
127133
}
128134
}
129135

@@ -1494,7 +1500,8 @@ void Driver::buildOutputInfo(const ToolChain &TC, const DerivedArgList &Args,
14941500
OI.ShouldTreatModuleAsTopLevelOutput = false;
14951501
} else if (Args.hasArg(options::OPT_emit_objc_header,
14961502
options::OPT_emit_objc_header_path,
1497-
options::OPT_experimental_emit_interface) &&
1503+
options::OPT_emit_parseable_module_interface,
1504+
options::OPT_emit_parseable_module_interface_path) &&
14981505
OI.CompilerMode != OutputInfo::Mode::SingleCompile) {
14991506
// An option has been passed which requires whole-module knowledge, but we
15001507
// don't have that. Generate a module, but treat it as an intermediate
@@ -2473,7 +2480,8 @@ Job *Driver::buildJobsForAction(Compilation &C, const JobAction *JA,
24732480
chooseSwiftModuleDocOutputPath(C, OutputMap, workingDirectory,
24742481
Output.get());
24752482

2476-
if (C.getArgs().hasArg(options::OPT_experimental_emit_interface))
2483+
if (C.getArgs().hasArg(options::OPT_emit_parseable_module_interface,
2484+
options::OPT_emit_parseable_module_interface_path))
24772485
chooseParseableInterfacePath(C, JA, workingDirectory, Buf, Output.get());
24782486

24792487
if (C.getArgs().hasArg(options::OPT_update_code) && isa<CompileJobAction>(JA))
@@ -2773,9 +2781,9 @@ void Driver::chooseRemappingOutputPath(Compilation &C,
27732781
}
27742782

27752783
void Driver::chooseParseableInterfacePath(Compilation &C, const JobAction *JA,
2776-
StringRef workingDirectory,
2777-
llvm::SmallString<128> &buffer,
2778-
CommandOutput *output) const {
2784+
StringRef workingDirectory,
2785+
llvm::SmallString<128> &buffer,
2786+
CommandOutput *output) const {
27792787
switch (C.getOutputInfo().CompilerMode) {
27802788
case OutputInfo::Mode::StandardCompile:
27812789
case OutputInfo::Mode::BatchModeCompile:
@@ -2792,9 +2800,10 @@ void Driver::chooseParseableInterfacePath(Compilation &C, const JobAction *JA,
27922800
}
27932801

27942802
StringRef outputPath = *getOutputFilenameFromPathArgOrAsTopLevel(
2795-
C.getOutputInfo(), C.getArgs(), llvm::opt::OptSpecifier(),
2796-
file_types::TY_SwiftModuleInterfaceFile,
2797-
/*TreatAsTopLevelOutput*/true, workingDirectory, buffer);
2803+
C.getOutputInfo(), C.getArgs(),
2804+
options::OPT_emit_parseable_module_interface_path,
2805+
file_types::TY_SwiftModuleInterfaceFile,
2806+
/*TreatAsTopLevelOutput*/true, workingDirectory, buffer);
27982807
output->setAdditionalOutputForType(file_types::TY_SwiftModuleInterfaceFile,
27992808
outputPath);
28002809
}

lib/Driver/ToolChains.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -547,7 +547,7 @@ void ToolChain::JobContext::addFrontendSupplementaryOutputArguments(
547547

548548
addOutputsOfType(arguments, Output, Args,
549549
file_types::ID::TY_SwiftModuleInterfaceFile,
550-
"-emit-interface-path");
550+
"-emit-parseable-module-interface-path");
551551

552552
addOutputsOfType(arguments, Output, Args,
553553
file_types::TY_SerializedDiagnostics,
@@ -804,7 +804,7 @@ ToolChain::constructInvocation(const MergeModuleJobAction &job,
804804
file_types::TY_SwiftModuleDocFile, "-emit-module-doc-path");
805805
addOutputsOfType(Arguments, context.Output, context.Args,
806806
file_types::ID::TY_SwiftModuleInterfaceFile,
807-
"-emit-interface-path");
807+
"-emit-parseable-module-interface-path");
808808
addOutputsOfType(Arguments, context.Output, context.Args,
809809
file_types::TY_SerializedDiagnostics,
810810
"-serialize-diagnostics-path");

lib/Frontend/ArgsToFrontendOutputsConverter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ SupplementaryOutputPathsComputer::getSupplementaryOutputPathsFromArguments()
295295
options::OPT_emit_loaded_module_trace_path);
296296
auto TBD = getSupplementaryFilenamesFromArguments(options::OPT_emit_tbd_path);
297297
auto parseableInterfaceOutput = getSupplementaryFilenamesFromArguments(
298-
options::OPT_emit_interface_path);
298+
options::OPT_emit_parseable_module_interface_path);
299299

300300
if (!objCHeaderOutput || !moduleOutput || !moduleDocOutput ||
301301
!dependenciesFile || !referenceDependenciesFile ||

test/Driver/emit-interface.swift

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,21 @@
1-
// RUN: %swiftc_driver -driver-print-jobs -target x86_64-apple-macosx10.9 %s -experimental-emit-interface -o %t/foo 2>&1 | %FileCheck %s
1+
// RUN: %swiftc_driver -driver-print-jobs -target x86_64-apple-macosx10.9 %s -emit-parseable-module-interface -o %t/foo 2>&1 | %FileCheck %s
22

33
// CHECK: swift -frontend
44
// CHECK-SAME: emit-interface.swift
55
// CHECK: swift -frontend -merge-modules
6-
// CHECK-SAME: -emit-interface-path {{.+}}/foo.swiftinterface
6+
// CHECK-SAME: -emit-parseable-module-interface-path {{.+}}/foo.swiftinterface
77
// CHECK: bin/ld
88

9-
// RUN: %swiftc_driver -driver-print-jobs -target x86_64-apple-macosx10.9 %s -experimental-emit-interface -o %t/foo -force-single-frontend-invocation 2>&1 | %FileCheck -check-prefix=CHECK-WHOLE-MODULE %s
9+
// RUN: %swiftc_driver -driver-print-jobs -target x86_64-apple-macosx10.9 %s -emit-parseable-module-interface -o %t/foo -force-single-frontend-invocation 2>&1 | %FileCheck -check-prefix=CHECK-WHOLE-MODULE %s
1010

1111
// CHECK-WHOLE-MODULE: swift -frontend
1212
// CHECK-WHOLE-MODULE-SAME: emit-interface.swift
13-
// CHECK-WHOLE-MODULE-SAME: -emit-interface-path {{.+}}/foo.swiftinterface
13+
// CHECK-WHOLE-MODULE-SAME: -emit-parseable-module-interface-path {{.+}}/foo.swiftinterface
1414
// CHECK-WHOLE-MODULE-NOT: -merge-modules
1515
// CHECK-WHOLE-MODULE: bin/ld
16+
17+
// RUN: %swiftc_driver -driver-print-jobs -target x86_64-apple-macosx10.9 %s -emit-parseable-module-interface-path %t/unrelated.swiftinterface -o %t/foo -force-single-frontend-invocation 2>&1 | %FileCheck -check-prefix=CHECK-EXPLICIT-PATH %s
18+
19+
// CHECK-EXPLICIT-PATH: swift -frontend
20+
// CHECK-EXPLICIT-PATH-SAME: emit-interface.swift
21+
// CHECK-EXPLICIT-PATH-SAME: -emit-parseable-module-interface-path {{.+}}/unrelated.swiftinterface

test/Driver/options.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@
2525
// RUN: not %swiftc_driver -import-objc-header fake.h -import-underlying-module -c %s 2>&1 | %FileCheck -check-prefix=FRAMEWORK_BRIDGING_HEADER %s
2626
// FRAMEWORK_BRIDGING_HEADER: error: using bridging headers with framework targets is unsupported
2727

28+
// RUN: not %swiftc_driver -import-objc-header fake.h -emit-parseable-module-interface %s 2>&1 | %FileCheck -check-prefix=BRIDGING_HEADER_SWIFTINTERFACE %s
29+
// RUN: not %swiftc_driver -import-objc-header fake.h -emit-parseable-module-interface-path fake.swiftinterface %s 2>&1 | %FileCheck -check-prefix=BRIDGING_HEADER_SWIFTINTERFACE %s
30+
// BRIDGING_HEADER_SWIFTINTERFACE: error: using bridging headers with parseable module interfaces is unsupported
31+
2832
// RUN: %swift_driver -### | %FileCheck -check-prefix=DEFAULT_REPL %s
2933
// DEFAULT_REPL: -repl
3034
// RUN: not %swiftc_driver 2>&1 | %FileCheck -check-prefix=DEFAULT_EXEC_ERR %s

test/Frontend/dependencies.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
// NO-PRIMARY-FILE: warning: ignoring -emit-reference-dependencies (requires -primary-file)
2626

2727

28-
// RUN: %target-swift-frontend -emit-dependencies-path - -emit-module %S/../Inputs/empty\ file.swift -o %t/empty\ file.swiftmodule -emit-module-doc-path %t/empty\ file.swiftdoc -emit-objc-header-path %t/empty\ file.h -emit-interface-path %t/empty\ file.swiftinterface | %FileCheck -check-prefix=CHECK-MULTIPLE-OUTPUTS %s
28+
// RUN: %target-swift-frontend -emit-dependencies-path - -emit-module %S/../Inputs/empty\ file.swift -o %t/empty\ file.swiftmodule -emit-module-doc-path %t/empty\ file.swiftdoc -emit-objc-header-path %t/empty\ file.h -emit-parseable-module-interface-path %t/empty\ file.swiftinterface | %FileCheck -check-prefix=CHECK-MULTIPLE-OUTPUTS %s
2929

3030
// CHECK-MULTIPLE-OUTPUTS-LABEL: empty\ file.swiftmodule :
3131
// CHECK-MULTIPLE-OUTPUTS: Inputs/empty\ file.swift

test/Frontend/supplementary-output-support.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
// RUN: not %target-swift-frontend -resolve-imports -emit-objc-header %s 2>&1 | %FileCheck -check-prefix=RESOLVE_IMPORTS_NO_OBJC_HEADER %s
2525
// RESOLVE_IMPORTS_NO_OBJC_HEADER: error: this mode does not support emitting Objective-C headers{{$}}
2626

27-
// RUN: not %target-swift-frontend -parse -emit-interface-path %t %s 2>&1 | %FileCheck -check-prefix=PARSE_NO_INTERFACE %s
27+
// RUN: not %target-swift-frontend -parse -emit-parseable-module-interface-path %t %s 2>&1 | %FileCheck -check-prefix=PARSE_NO_INTERFACE %s
2828
// PARSE_NO_INTERFACE: error: this mode does not support emitting parseable interface files{{$}}
29-
// RUN: not %target-swift-frontend -emit-silgen -emit-interface-path %t %s 2>&1 | %FileCheck -check-prefix=SILGEN_NO_INTERFACE %s
29+
// RUN: not %target-swift-frontend -emit-silgen -emit-parseable-module-interface-path %t %s 2>&1 | %FileCheck -check-prefix=SILGEN_NO_INTERFACE %s
3030
// SILGEN_NO_INTERFACE: error: this mode does not support emitting parseable interface files{{$}}

test/ParseableInterface/access-filter.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %target-swift-frontend -typecheck -emit-interface-path %t.swiftinterface %s
1+
// RUN: %target-swift-frontend -typecheck -emit-parseable-module-interface-path %t.swiftinterface %s
22
// RUN: %FileCheck %s < %t.swiftinterface
33
// RUN: %FileCheck -check-prefix NEGATIVE %s < %t.swiftinterface
44

test/ParseableInterface/attrs.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %target-swift-frontend -typecheck -emit-interface-path %t.swiftinterface -enable-resilience %s
1+
// RUN: %target-swift-frontend -typecheck -emit-parseable-module-interface-path %t.swiftinterface -enable-resilience %s
22
// RUN: %FileCheck %s < %t.swiftinterface
33

44
// CHECK: @_transparent public func glass() -> Int { return 0 }{{$}}

test/ParseableInterface/conformances.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %target-swift-frontend-typecheck -emit-interface-path %t.swiftinterface %s
1+
// RUN: %target-swift-frontend-typecheck -emit-parseable-module-interface-path %t.swiftinterface %s
22
// RUN: %FileCheck %s < %t.swiftinterface
33
// RUN: %FileCheck -check-prefix NEGATIVE %s < %t.swiftinterface
44

test/ParseableInterface/dataflow-errors.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// RUN: rm -f %t
2-
// RUN: not %target-swift-frontend -emit-interface-path %t -emit-module -o /dev/null %s
2+
// RUN: not %target-swift-frontend -emit-parseable-module-interface-path %t -emit-module -o /dev/null %s
33
// RUN: test ! -f %t
4-
// RUN: %target-swift-frontend -emit-interface-path %t -typecheck %s
4+
// RUN: %target-swift-frontend -emit-parseable-module-interface-path %t -typecheck %s
55
// RUN: test -f %t
66

77
public struct BadInit {

test/ParseableInterface/if-configs.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// RUN: %target-swift-frontend -merge-modules -emit-module -o %t/Test.swiftmodule %t/Test~partial.swiftmodule
44
// RUN: %target-swift-ide-test -print-module -module-to-print=Test -source-filename=x -I %t | %FileCheck %s
55

6-
// RUN: %target-swift-frontend -typecheck -emit-interface-path %t.swiftinterface -enable-resilience %s
6+
// RUN: %target-swift-frontend -typecheck -emit-parseable-module-interface-path %t.swiftinterface -enable-resilience %s
77
// RUN: %FileCheck %s < %t.swiftinterface
88

99
// CHECK: func hasClosureDefaultArg(_ x: () -> Void = {

test/ParseableInterface/imports-submodule-order.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// RUN: %target-swift-frontend -typecheck -emit-interface-path - %s -I %S/Inputs/imports-submodule-order/ | %FileCheck %s
2-
// RUN: %target-swift-frontend -typecheck -emit-interface-path - %s -I %S/Inputs/imports-submodule-order/ -D XY | %FileCheck %s
1+
// RUN: %target-swift-frontend -typecheck -emit-parseable-module-interface-path - %s -I %S/Inputs/imports-submodule-order/ | %FileCheck %s
2+
// RUN: %target-swift-frontend -typecheck -emit-parseable-module-interface-path - %s -I %S/Inputs/imports-submodule-order/ -D XY | %FileCheck %s
33

44
#if XY
55
@_exported import X.Submodule

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-interface-path - %s %S/Inputs/imports-other.swift -I %S/Inputs/imports-clang-modules/ -I %t -verify | %FileCheck %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 | %FileCheck %s
44

55

66
@_exported import empty

test/ParseableInterface/inlinable-function.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// RUN: %empty-directory(%t)
2-
// RUN: %target-swift-frontend -emit-module -o %t/Test.swiftmodule -emit-interface-path %t/Test.swiftinterface -module-name Test %s
2+
// RUN: %target-swift-frontend -emit-module -o %t/Test.swiftmodule -emit-parseable-module-interface-path %t/Test.swiftinterface -module-name Test %s
33
// RUN: %FileCheck %s < %t/Test.swiftinterface
4-
// RUN: %target-swift-frontend -emit-module -o /dev/null -merge-modules %t/Test.swiftmodule -disable-objc-attr-requires-foundation-module -emit-interface-path - -module-name Test | %FileCheck %s
4+
// RUN: %target-swift-frontend -emit-module -o /dev/null -merge-modules %t/Test.swiftmodule -disable-objc-attr-requires-foundation-module -emit-parseable-module-interface-path - -module-name Test | %FileCheck %s
55

66
// CHECK: public struct Foo : Hashable {
77
public struct Foo: Hashable {

test/ParseableInterface/modifiers.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// RUN: %empty-directory(%t)
2-
// RUN: %target-swift-frontend -emit-module -o %t/Test.swiftmodule -emit-interface-path %t/Test.swiftinterface -module-name Test -disable-objc-attr-requires-foundation-module -enable-objc-interop %s
2+
// RUN: %target-swift-frontend -emit-module -o %t/Test.swiftmodule -emit-parseable-module-interface-path %t/Test.swiftinterface -module-name Test -disable-objc-attr-requires-foundation-module -enable-objc-interop %s
33
// RUN: %FileCheck %s < %t/Test.swiftinterface
4-
// RUN: %target-swift-frontend -emit-module -o /dev/null -merge-modules %t/Test.swiftmodule -disable-objc-attr-requires-foundation-module -emit-interface-path - -module-name Test -enable-objc-interop | %FileCheck %s
4+
// RUN: %target-swift-frontend -emit-module -o /dev/null -merge-modules %t/Test.swiftmodule -disable-objc-attr-requires-foundation-module -emit-parseable-module-interface-path - -module-name Test -enable-objc-interop | %FileCheck %s
55

66
// CHECK: final public class FinalClass {
77
public final class FinalClass {

test/ParseableInterface/print-from-partial-modules.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// RUN: %empty-directory(%t)
22
// RUN: %target-swift-frontend -emit-module -o %t/main~partial.swiftmodule -primary-file %s %S/Inputs/other.swift -module-name main
33
// RUN: %target-swift-frontend -emit-module -o %t/other~partial.swiftmodule %s -primary-file %S/Inputs/other.swift -module-name main
4-
// RUN: %target-swift-frontend -merge-modules -emit-module -o /dev/null -emit-interface-path - %t/main~partial.swiftmodule -module-name main %t/other~partial.swiftmodule | %FileCheck %s
4+
// RUN: %target-swift-frontend -merge-modules -emit-module -o /dev/null -emit-parseable-module-interface-path - %t/main~partial.swiftmodule -module-name main %t/other~partial.swiftmodule | %FileCheck %s
55

66
// CHECK: {{^}}public func verySimpleFunction(){{$}}
77
public func verySimpleFunction() {}

test/ParseableInterface/private-stored-member-type-layout.swift

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

33
// Check that importing this module creates the right types
44

5-
// RUN: %target-swift-frontend -emit-interface-path %t/private-stored-members.swiftinterface -module-name PrivateStoredMembers -emit-module -o %t/PrivateStoredMembers.swiftmodule %S/private-stored-members.swift
5+
// RUN: %target-swift-frontend -emit-parseable-module-interface-path %t/private-stored-members.swiftinterface -module-name PrivateStoredMembers -emit-module -o %t/PrivateStoredMembers.swiftmodule %S/private-stored-members.swift
66
// RUN: %target-swift-frontend -emit-ir %s -I %t 2>&1 -DSHOULD_IMPORT | %FileCheck %s --check-prefix CHECK-EXEC --check-prefix CHECK
77

88
// Check that the types are also correct when importing a module created from an interface

test/ParseableInterface/private-stored-members.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
// RUN: %empty-directory(%t)
22

3-
// RUN: %target-swift-frontend -typecheck -emit-interface-path %t.swiftinterface %s
3+
// RUN: %target-swift-frontend -typecheck -emit-parseable-module-interface-path %t.swiftinterface %s
44
// RUN: %FileCheck %s < %t.swiftinterface --check-prefix CHECK --check-prefix COMMON
55

6-
// RUN: %target-swift-frontend -typecheck -emit-interface-path %t-resilient.swiftinterface -enable-resilience %s
6+
// RUN: %target-swift-frontend -typecheck -emit-parseable-module-interface-path %t-resilient.swiftinterface -enable-resilience %s
77
// RUN: %FileCheck %s --check-prefix RESILIENT --check-prefix COMMON < %t-resilient.swiftinterface
88

99
// RUN: %target-swift-frontend -emit-module -o %t/Test.swiftmodule %t.swiftinterface -disable-objc-attr-requires-foundation-module
10-
// RUN: %target-swift-frontend -emit-module -o /dev/null -merge-modules %t/Test.swiftmodule -module-name Test -emit-interface-path - | %FileCheck %s --check-prefix CHECK --check-prefix COMMON
10+
// RUN: %target-swift-frontend -emit-module -o /dev/null -merge-modules %t/Test.swiftmodule -module-name Test -emit-parseable-module-interface-path - | %FileCheck %s --check-prefix CHECK --check-prefix COMMON
1111

1212
// RUN: %target-swift-frontend -emit-module -o %t/TestResilient.swiftmodule -enable-resilience %t.swiftinterface -disable-objc-attr-requires-foundation-module
13-
// RUN: %target-swift-frontend -emit-module -o /dev/null -merge-modules %t/TestResilient.swiftmodule -module-name TestResilient -enable-resilience -emit-interface-path - | %FileCheck %s --check-prefix RESILIENT --check-prefix COMMON
13+
// RUN: %target-swift-frontend -emit-module -o /dev/null -merge-modules %t/TestResilient.swiftmodule -module-name TestResilient -enable-resilience -emit-parseable-module-interface-path - | %FileCheck %s --check-prefix RESILIENT --check-prefix COMMON
1414

1515

1616
// COMMON: struct MyStruct {{{$}}

0 commit comments

Comments
 (0)