diff options
author | Dan Gohman <gohman@apple.com> | 2010-05-19 01:21:34 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2010-05-19 01:21:34 +0000 |
commit | 744c96dd483b18d9557a16cb2d398177b6d800c1 (patch) | |
tree | 61948b0b886aa9b3cc92e9d35c5dfced7df4763c /llvm/lib/Support/Timer.cpp | |
parent | abd0ad54a475bffd74ad67bf66aa0a060523ccab (diff) | |
download | bcm5719-llvm-744c96dd483b18d9557a16cb2d398177b6d800c1.tar.gz bcm5719-llvm-744c96dd483b18d9557a16cb2d398177b6d800c1.zip |
Add a comment explaining why this code uses Append mode.
llvm-svn: 104095
Diffstat (limited to 'llvm/lib/Support/Timer.cpp')
-rw-r--r-- | llvm/lib/Support/Timer.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/Support/Timer.cpp b/llvm/lib/Support/Timer.cpp index 481f6ba5086..784b77cf591 100644 --- a/llvm/lib/Support/Timer.cpp +++ b/llvm/lib/Support/Timer.cpp @@ -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); |