Merge pull request #14920 from davidungar/PR-18-9-batch-fix
[Batch mode]: Use first primary name for batch input file name.
diff --git a/lib/Frontend/FrontendInputsAndOutputs.cpp b/lib/Frontend/FrontendInputsAndOutputs.cpp
index f37eec1..0cb77fa 100644
--- a/lib/Frontend/FrontendInputsAndOutputs.cpp
+++ b/lib/Frontend/FrontendInputsAndOutputs.cpp
@@ -124,12 +124,9 @@
}
std::string FrontendInputsAndOutputs::getStatsFileMangledInputName() const {
- // FIXME: "batch" should probably be some concatenation of all the primary
- // input names, in order to keep the stats file names unique. (Or perhaps just
- // the first primary?)
- return isWholeModule()
- ? "all"
- : primaryInputCount() == 1 ? firstPrimaryInput().file() : "batch";
+ // Use the first primary, even if there are multiple primaries.
+ // That's enough to keep the file names unique.
+ return isWholeModule() ? "all" : firstPrimaryInput().file();
}
bool FrontendInputsAndOutputs::isInputPrimary(StringRef file) const {