[llvm-cov] Attempt to appease Windows bots
authorVedant Kumar <vsk@apple.com>
Fri, 15 Jul 2016 23:08:22 +0000 (23:08 +0000)
committerVedant Kumar <vsk@apple.com>
Fri, 15 Jul 2016 23:08:22 +0000 (23:08 +0000)
They appear to reject r275640 because stdin is held open during an
ExecuteAndWait in which it's redirected:

  http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast/builds/8390

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@275642 91177308-0d34-0410-b5e6-96231b3b80d8

tools/llvm-cov/CodeCoverage.cpp

index 2ceaa1f1da3f0c7d53156b086202e5abe72336dc..e9346cd4c5b6da904cae6d0e921ecdd5ba0e3b62 100644 (file)
@@ -327,7 +327,7 @@ void CodeCoverageTool::demangleSymbols(const CoverageMapping &Coverage) {
     InputTOF.os() << Function.Name << '\n';
     ++NumSymbols;
   }
-  InputTOF.os().flush();
+  InputTOF.os().close();
 
   // Use another temporary file to store the demangler's output.
   int OutputFD;
@@ -339,6 +339,7 @@ void CodeCoverageTool::demangleSymbols(const CoverageMapping &Coverage) {
     return;
   }
   tool_output_file OutputTOF{OutputPath, OutputFD};
+  OutputTOF.os().close();
 
   // Invoke the demangler.
   std::vector<const char *> ArgsV;