File tree Expand file tree Collapse file tree 2 files changed +23
-14
lines changed Expand file tree Collapse file tree 2 files changed +23
-14
lines changed Original file line number Diff line number Diff line change @@ -64,7 +64,17 @@ class OutputInfo {
64
64
// / A compilation using a single frontend invocation without -primary-file.
65
65
SingleCompile,
66
66
67
- // / A single process that batches together multiple StandardCompile jobs.
67
+ // / A single process that batches together multiple StandardCompile Jobs.
68
+ // /
69
+ // / Note: this is a transient value to use _only_ for the individual
70
+ // / BatchJobs that are the temporary containers for multiple StandardCompile
71
+ // / Jobs built by ToolChain::constructBatchJob.
72
+ // /
73
+ // / In particular, the driver treats a batch-mode-enabled Compilation as
74
+ // / having OutputInfo::CompilerMode == StandardCompile, with the
75
+ // / Compilation::BatchModeEnabled flag set to true, _not_ as a
76
+ // / BatchModeCompile Compilation. The top-level OutputInfo::CompilerMode for
77
+ // / a Compilation should never be BatchModeCompile.
68
78
BatchModeCompile,
69
79
70
80
// / Invoke the REPL
Original file line number Diff line number Diff line change @@ -1403,19 +1403,18 @@ Driver::computeCompilerMode(const DerivedArgList &Args,
1403
1403
options::OPT_disable_batch_mode,
1404
1404
false );
1405
1405
1406
- if (ArgRequiringSingleCompile) {
1407
- // Override batch mode if given -wmo or -index-file.
1408
- if (BatchModeOut) {
1409
- BatchModeOut = false ;
1410
- // Emit a warning about such overriding (FIXME: we might conditionalize
1411
- // this based on the user or xcode passing -disable-batch-mode).
1412
- Diags.diagnose (SourceLoc (), diag::warn_ignoring_batch_mode,
1413
- ArgRequiringSingleCompile->getOption ().getPrefixedName ());
1414
- }
1415
- return OutputInfo::Mode::SingleCompile;
1416
- }
1417
-
1418
- return OutputInfo::Mode::StandardCompile;
1406
+ if (!ArgRequiringSingleCompile)
1407
+ return OutputInfo::Mode::StandardCompile;
1408
+
1409
+ // Override batch mode if given -wmo or -index-file.
1410
+ if (BatchModeOut) {
1411
+ BatchModeOut = false ;
1412
+ // Emit a warning about such overriding (FIXME: we might conditionalize
1413
+ // this based on the user or xcode passing -disable-batch-mode).
1414
+ Diags.diagnose (SourceLoc (), diag::warn_ignoring_batch_mode,
1415
+ ArgRequiringSingleCompile->getOption ().getPrefixedName ());
1416
+ }
1417
+ return OutputInfo::Mode::SingleCompile;
1419
1418
}
1420
1419
1421
1420
void Driver::buildActions (SmallVectorImpl<const Action *> &TopLevelActions,
You can’t perform that action at this time.
0 commit comments