[llvm] r262731 - Fix bot failure from r262721: unintented change in gold-plugin save-temps

Teresa Johnson via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 4 10:16:00 PST 2016


Author: tejohnson
Date: Fri Mar  4 12:16:00 2016
New Revision: 262731

URL: http://llvm.org/viewvc/llvm-project?rev=262731&view=rev
Log:
Fix bot failure from r262721: unintented change in gold-plugin save-temps

The split code gen task ID should not be appended to save-temps output
file when the parallelism factor is 1 (not actually splitting).

Modified:
    llvm/trunk/tools/gold/gold-plugin.cpp

Modified: llvm/trunk/tools/gold/gold-plugin.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/gold/gold-plugin.cpp?rev=262731&r1=262730&r2=262731&view=diff
==============================================================================
--- llvm/trunk/tools/gold/gold-plugin.cpp (original)
+++ llvm/trunk/tools/gold/gold-plugin.cpp Fri Mar  4 12:16:00 2016
@@ -1013,7 +1013,9 @@ void CodeGen::runSplitCodeGen() {
     std::list<llvm::raw_fd_ostream> OSs;
     std::vector<llvm::raw_pwrite_stream *> OSPtrs(MaxThreads);
     for (unsigned I = 0; I != MaxThreads; ++I) {
-      int FD = openOutputFile(Filename, TempOutFile, Filenames[I], I);
+      int FD = openOutputFile(Filename, TempOutFile, Filenames[I],
+                              // Only append ID if there are multiple tasks.
+                              MaxThreads > 1 ? I : -1);
       OSs.emplace_back(FD, true);
       OSPtrs[I] = &OSs.back();
     }




More information about the llvm-commits mailing list