Skip to content

Commit 272c5d8

Browse files
committed
Small improvements from Jordan’s review.
1 parent 9fd23bb commit 272c5d8

File tree

1 file changed

+8
-11
lines changed

1 file changed

+8
-11
lines changed

lib/Driver/Driver.cpp

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -674,17 +674,14 @@ getDriverBatchCount(llvm::opt::InputArgList &ArgList,
674674

675675
static bool computeIncremental(const llvm::opt::InputArgList *ArgList,
676676
const bool ShowIncrementalBuildDecisions) {
677-
{
678-
const bool WasIncrementalRequested =
679-
ArgList->hasArg(options::OPT_incremental);
680-
if (!WasIncrementalRequested)
681-
return false;
682-
}
677+
if (!ArgList->hasArg(options::OPT_incremental))
678+
return false;
679+
683680
const char *ReasonToDisable =
684681
ArgList->hasArg(options::OPT_whole_module_optimization)
685682
? "is not compatible with whole module optimization."
686683
: ArgList->hasArg(options::OPT_embed_bitcode)
687-
? "is not currently compatible with embedding LLVM IR bitcode"
684+
? "is not currently compatible with embedding LLVM IR bitcode."
688685
: nullptr;
689686

690687
if (!ReasonToDisable)
@@ -709,9 +706,9 @@ computeWorkingDirectory(const llvm::opt::InputArgList *ArgList) {
709706
}
710707

711708
static std::unique_ptr<UnifiedStatsReporter>
712-
computeStatsReporter(const llvm::opt::InputArgList *ArgList,
713-
const InputFileList &Inputs, const OutputInfo OI,
714-
StringRef DefaultTargetTriple) {
709+
createStatsReporter(const llvm::opt::InputArgList *ArgList,
710+
const InputFileList &Inputs, const OutputInfo OI,
711+
StringRef DefaultTargetTriple) {
715712
const Arg *A = ArgList->getLastArgNoClaim(options::OPT_stats_output_dir);
716713
if (!A)
717714
return nullptr;
@@ -886,7 +883,7 @@ Driver::buildCompilation(const ToolChain &TC,
886883
const bool ShowDriverTimeCompilation =
887884
ArgList->hasArg(options::OPT_driver_time_compilation);
888885
std::unique_ptr<UnifiedStatsReporter> StatsReporter =
889-
computeStatsReporter(ArgList.get(), Inputs, OI, DefaultTargetTriple);
886+
createStatsReporter(ArgList.get(), Inputs, OI, DefaultTargetTriple);
890887

891888
C = llvm::make_unique<Compilation>(
892889
Diags, TC, OI, Level,

0 commit comments

Comments
 (0)