llvm.org GIT mirror llvm / f1f0734
Don't repeat names in comments. NFC. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234405 91177308-0d34-0410-b5e6-96231b3b80d8 Rafael Espindola 5 years ago
1 changed file(s) with 10 addition(s) and 11 deletion(s). Raw diff Collapse all Expand all
1717
1818 namespace llvm {
1919
20 /// tool_output_file - This class contains a raw_fd_ostream and adds a
21 /// few extra features commonly needed for compiler-like tool output files:
20 /// This class contains a raw_fd_ostream and adds a few extra features commonly
21 /// needed for compiler-like tool output files:
2222 /// - The file is automatically deleted if the process is killed.
2323 /// - The file is automatically deleted when the tool_output_file
2424 /// object is destroyed unless the client calls keep().
2525 class tool_output_file {
26 /// Installer - This class is declared before the raw_fd_ostream so that
27 /// it is constructed before the raw_fd_ostream is constructed and
28 /// destructed after the raw_fd_ostream is destructed. It installs
29 /// cleanups in its constructor and uninstalls them in its destructor.
26 /// This class is declared before the raw_fd_ostream so that it is constructed
27 /// before the raw_fd_ostream is constructed and destructed after the
28 /// raw_fd_ostream is destructed. It installs cleanups in its constructor and
29 /// uninstalls them in its destructor.
3030 class CleanupInstaller {
3131 /// The name of the file.
3232 std::string Filename;
3838 ~CleanupInstaller();
3939 } Installer;
4040
41 /// OS - The contained stream. This is intentionally declared after
42 /// Installer.
41 /// The contained stream. This is intentionally declared after Installer.
4342 raw_fd_ostream OS;
4443
4544 public:
5049
5150 tool_output_file(StringRef Filename, int FD);
5251
53 /// os - Return the contained raw_fd_ostream.
52 /// Return the contained raw_fd_ostream.
5453 raw_fd_ostream &os() { return OS; }
5554
56 /// keep - Indicate that the tool's job wrt this output file has been
57 /// successful and the file should not be deleted.
55 /// Indicate that the tool's job wrt this output file has been successful and
56 /// the file should not be deleted.
5857 void keep() { Installer.Keep = true; }
5958 };
6059