1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 11:13:28 +01:00

Add a comment explaining why this code uses Append mode.

llvm-svn: 104095
This commit is contained in:
Dan Gohman 2010-05-19 01:21:34 +00:00
parent 632cb17357
commit 434b54846d

View File

@ -61,6 +61,10 @@ raw_ostream *llvm::CreateInfoOutputFile() {
if (OutputFilename == "-")
return new raw_fd_ostream(1, false); // stdout.
// Append mode is used because the info output file is opened and closed
// each time -stats or -time-passes wants to print output to it. To
// compensate for this, the test-suite Makefiles have code to delete the
// info output file before running commands which write to it.
std::string Error;
raw_ostream *Result = new raw_fd_ostream(OutputFilename.c_str(),
Error, raw_fd_ostream::F_Append);