LLVM API Documentation

Public Member Functions
llvm::FileRemover Class Reference

#include <FileUtilities.h>

List of all members.

Public Member Functions

 FileRemover ()
 FileRemover (const Twine &filename, bool deleteIt=true)
 ~FileRemover ()
void setFile (const Twine &filename, bool deleteIt=true)
void releaseFile ()

Detailed 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).

Definition at line 40 of file FileUtilities.h.


Constructor & Destructor Documentation

Definition at line 44 of file FileUtilities.h.

llvm::FileRemover::FileRemover ( const Twine filename,
bool  deleteIt = true 
) [inline, explicit]

Definition at line 46 of file FileUtilities.h.

References llvm::Twine::toVector().


Member Function Documentation

void llvm::FileRemover::releaseFile ( ) [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 74 of file FileUtilities.h.

void llvm::FileRemover::setFile ( const Twine filename,
bool  deleteIt = true 
) [inline]

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 61 of file FileUtilities.h.

References llvm::SmallVectorImpl< T >::clear(), llvm::LibFunc::remove, llvm::SmallString< InternalLen >::str(), and llvm::Twine::toVector().


The documentation for this class was generated from the following file: