Skip to content

Commit 30f95f4

Browse files
author
David Ungar
authored
Merge pull request #14920 from davidungar/PR-18-9-batch-fix
[Batch mode]: Use first primary name for batch input file name.
2 parents aa207ad + 026882d commit 30f95f4

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

lib/Frontend/FrontendInputsAndOutputs.cpp

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -124,12 +124,9 @@ FrontendInputsAndOutputs::getRequiredUniquePrimaryInput() const {
124124
}
125125

126126
std::string FrontendInputsAndOutputs::getStatsFileMangledInputName() const {
127-
// FIXME: "batch" should probably be some concatenation of all the primary
128-
// input names, in order to keep the stats file names unique. (Or perhaps just
129-
// the first primary?)
130-
return isWholeModule()
131-
? "all"
132-
: primaryInputCount() == 1 ? firstPrimaryInput().file() : "batch";
127+
// Use the first primary, even if there are multiple primaries.
128+
// That's enough to keep the file names unique.
129+
return isWholeModule() ? "all" : firstPrimaryInput().file();
133130
}
134131

135132
bool FrontendInputsAndOutputs::isInputPrimary(StringRef file) const {

0 commit comments

Comments
 (0)