class FileRemover
Declaration
class FileRemover { /* full declaration omitted */ };
Description
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).
Declared at: llvm/include/llvm/Support/FileUtilities.h:42
Method Overview
- public FileRemover()
- public FileRemover(const llvm::Twine & filename, bool deleteIt = true)
- public void releaseFile()
- public void setFile(const llvm::Twine & filename, bool deleteIt = true)
- public ~FileRemover()
Methods
¶FileRemover()
FileRemover()
Declared at: llvm/include/llvm/Support/FileUtilities.h:46
¶FileRemover(const llvm::Twine& filename,
bool deleteIt = true)
FileRemover(const llvm::Twine& filename,
bool deleteIt = true)
Declared at: llvm/include/llvm/Support/FileUtilities.h:48
Parameters
- const llvm::Twine& filename
- bool deleteIt = true
¶void releaseFile()
void releaseFile()
Description
releaseFile - Take ownership of the file away from the FileRemover so it will not be removed when the object is destroyed.
Declared at: llvm/include/llvm/Support/FileUtilities.h:76
¶void setFile(const llvm::Twine& filename,
bool deleteIt = true)
void setFile(const llvm::Twine& filename,
bool deleteIt = true)
Description
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.
Declared at: llvm/include/llvm/Support/FileUtilities.h:63
Parameters
- const llvm::Twine& filename
- bool deleteIt = true
¶~FileRemover()
~FileRemover()
Declared at: llvm/include/llvm/Support/FileUtilities.h:53