LLVM API Documentation
#include <FileUtilities.h>
Public Member Functions | |
FileRemover () | |
FileRemover (const Twine &filename, bool deleteIt=true) | |
~FileRemover () | |
void | setFile (const Twine &filename, bool deleteIt=true) |
void | releaseFile () |
FileRemover - This class is a simple object meant to be stack allocated. If an exception is thrown from a region, the object removes the filename specified (if deleteIt is true).
Definition at line 40 of file FileUtilities.h.
|
inline |
Definition at line 44 of file FileUtilities.h.
Definition at line 46 of file FileUtilities.h.
References llvm::Twine::toVector().
|
inline |
Definition at line 51 of file FileUtilities.h.
References llvm::sys::fs::remove(), and llvm::SmallString< InternalLen >::str().
|
inline |
releaseFile - Take ownership of the file away from the FileRemover so it will not be removed when the object is destroyed.
Definition at line 76 of file FileUtilities.h.
setFile - Give ownership of the file to the FileRemover so it will be removed when the object is destroyed. If the FileRemover already had ownership of a file, remove it first.
Definition at line 62 of file FileUtilities.h.
References llvm::SmallVectorImpl< T >::clear(), llvm::sys::fs::remove(), llvm::SmallString< InternalLen >::str(), and llvm::Twine::toVector().