Skip to content

Commit d390ac7

Browse files
authored
Merge pull request #23805 from apple/revert-23725-optifreeze
Revert "[ParseableInterfaces] Stop explicitly optimizing cached modules"
2 parents 9c0de5a + 4ab983b commit d390ac7

File tree

3 files changed

+5
-17
lines changed

3 files changed

+5
-17
lines changed

lib/Frontend/ParseableInterfaceModuleLoader.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -520,6 +520,10 @@ class swift::ParseableInterfaceBuilder {
520520
return;
521521
}
522522

523+
// Optimize emitted modules. This has to happen after we parse arguments,
524+
// because parseSILOpts would override the current optimization mode.
525+
subInvocation.getSILOptions().OptMode = OptimizationMode::ForSpeed;
526+
523527
// Build the .swiftmodule; this is a _very_ abridged version of the logic
524528
// in performCompile in libFrontendTool, specialized, to just the one
525529
// module-serialization task we're trying to do here.

test/ParseableInterface/optimization-level.swift

Lines changed: 0 additions & 16 deletions
This file was deleted.

test/SourceKit/InterfaceGen/gen_swift_module.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,6 @@ func f(s : inout [Int]) {
3030
// Test we can generate the interface of a module loaded via a .swiftinterface file correctly
3131

3232
// RUN: %empty-directory(%t.mod)
33-
// RUN: %swift -emit-module -o /dev/null -emit-parseable-module-interface-path %t.mod/swift_mod.swiftinterface -O %S/Inputs/swift_mod.swift -parse-as-library
33+
// RUN: %swift -emit-module -o /dev/null -emit-parseable-module-interface-path %t.mod/swift_mod.swiftinterface %S/Inputs/swift_mod.swift -parse-as-library
3434
// RUN: %sourcekitd-test -req=interface-gen -module swift_mod -- -I %t.mod -module-cache-path %t.mod/mcp > %t.response
3535
// RUN: diff -u %s.from_swiftinterface.response %t.response

0 commit comments

Comments
 (0)