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

Methods

FileRemover()

Declared at: llvm/include/llvm/Support/FileUtilities.h:46

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()

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)

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()

Declared at: llvm/include/llvm/Support/FileUtilities.h:53