Skip to content

Commit 4ca60fe

Browse files
author
David Ungar
committed
Back off the WholeModule change to CompilerInstance::createSILModule()
(May be needed in this form for sil-opt.)
1 parent 097dd71 commit 4ca60fe

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/Frontend/Frontend.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,10 @@ std::string CompilerInvocation::getPCHHash() const {
5555

5656
void CompilerInstance::createSILModule() {
5757
assert(MainModule && "main module not created yet");
58+
// Assume WMO if a -primary-file option was not provided.
59+
bool WholeModule = !Invocation.getFrontendOptions().PrimaryInput.hasValue();
5860
TheSILModule = SILModule::createEmptyModule(
59-
getMainModule(), Invocation.getSILOptions(), isWholeModuleCompilation());
61+
getMainModule(), Invocation.getSILOptions(), WholeModule);
6062
}
6163

6264
void CompilerInstance::setPrimarySourceFile(SourceFile *SF) {

0 commit comments

Comments
 (0)