Skip to content

Commit 34df54a

Browse files
committed
Don’t extract ensureSILModuleIsSerialized.
1 parent 679c6ae commit 34df54a

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

lib/FrontendTool/FrontendTool.cpp

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1053,12 +1053,6 @@ static bool serializeSIBIfNeeded(FrontendOptions &opts, SILModule *SM,
10531053
return Context.hadError();
10541054
}
10551055

1056-
/// Serialize the SILModule if it was not serialized yet.
1057-
static void ensureSILModuleIsSerialized(SILModule *SM) {
1058-
if (!SM->isSerialized())
1059-
SM->serialize();
1060-
}
1061-
10621056
static void generateIR(IRGenOptions &IRGenOpts, std::unique_ptr<SILModule> SM,
10631057
StringRef OutputFilename, ModuleOrSourceFile MSF,
10641058
std::unique_ptr<llvm::Module> &IRModule,
@@ -1248,8 +1242,8 @@ static bool performCompileStepsPostSILGen(CompilerInstance &Instance,
12481242

12491243
const bool haveModulePath =
12501244
!opts.ModuleOutputPath.empty() || !opts.ModuleDocOutputPath.empty();
1251-
if (haveModulePath)
1252-
ensureSILModuleIsSerialized(SM.get());
1245+
if (haveModulePath && !SM->isSerialized())
1246+
SM->serialize();
12531247

12541248
if (haveModulePath) {
12551249
if (Action == FrontendOptions::ActionType::MergeModules ||

0 commit comments

Comments
 (0)