Skip to content

Commit 7271f68

Browse files
committed
Tweaks to shorten performCompile* a bit more.
1 parent 56b50cb commit 7271f68

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

lib/FrontendTool/FrontendTool.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1037,8 +1037,8 @@ static void setPrivateDiscriminatorIfNeeded(IRGenOptions &IRGenOpts,
10371037
IRGenOpts.DWARFDebugFlags += (" -private-discriminator " + PD.str()).str();
10381038
}
10391039

1040-
static bool serializeSIB(FrontendOptions &opts, SILModule *SM,
1041-
ASTContext &Context, ModuleOrSourceFile MSF) {
1040+
static bool serializeSIBIfNeeded(FrontendOptions &opts, SILModule *SM,
1041+
ASTContext &Context, ModuleOrSourceFile MSF) {
10421042
const std::string &moduleOutputPath = opts.ModuleOutputPath;
10431043
assert(!moduleOutputPath.empty() && "must have an output path");
10441044

@@ -1175,8 +1175,8 @@ static bool performCompileStepsPostSILGen(CompilerInstance &Instance,
11751175

11761176
if (Action == FrontendOptions::ActionType::EmitSIBGen) {
11771177
linkAllIfNeeded(Invocation, SM.get());
1178-
serializeSIB(Invocation.getFrontendOptions(), SM.get(),
1179-
Instance.getASTContext(), MSF);
1178+
serializeSIBIfNeeded(Invocation.getFrontendOptions(), SM.get(),
1179+
Instance.getASTContext(), MSF);
11801180
return Context.hadError();
11811181
}
11821182

@@ -1235,8 +1235,8 @@ static bool performCompileStepsPostSILGen(CompilerInstance &Instance,
12351235
opts.ImplicitObjCHeaderPath, moduleIsPublic);
12361236

12371237
if (Action == FrontendOptions::ActionType::EmitSIB)
1238-
return serializeSIB(Invocation.getFrontendOptions(), SM.get(),
1239-
Instance.getASTContext(), MSF);
1238+
return serializeSIBIfNeeded(Invocation.getFrontendOptions(), SM.get(),
1239+
Instance.getASTContext(), MSF);
12401240

12411241
const bool haveModulePath =
12421242
!opts.ModuleOutputPath.empty() || !opts.ModuleDocOutputPath.empty();

0 commit comments

Comments
 (0)