[ParseableInterfaces] Stop explicitly optimizing cached modules

Previously, we always optimized cached modules. Now, use the flag we're
already preserving to optimize them.

Fixes rdar://46358840
This commit is contained in:
Harlan Haskins
2019-04-01 16:35:36 -07:00
parent 48f3c45bbd
commit 406c005333
3 changed files with 17 additions and 5 deletions

View File

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