class ToolOutputFile

Declaration

class ToolOutputFile { /* full declaration omitted */ };

Description

This class contains a raw_fd_ostream and adds a few extra features commonly needed for compiler-like tool output files: - The file is automatically deleted if the process is killed. - The file is automatically deleted when the ToolOutputFile object is destroyed unless the client calls keep().

Declared at: llvm/include/llvm/Support/ToolOutputFile.h:25

Method Overview

  • public ToolOutputFile(llvm::StringRef Filename, std::error_code & EC, sys::fs::OpenFlags Flags)
  • public ToolOutputFile(llvm::StringRef Filename, int FD)
  • public void keep()
  • public llvm::raw_fd_ostream & os()

Methods

ToolOutputFile(llvm::StringRef Filename,
               std::error_code& EC,
               sys::fs::OpenFlags Flags)

Description

This constructor's arguments are passed to raw_fd_ostream's constructor.

Declared at: llvm/include/llvm/Support/ToolOutputFile.h:47

Parameters

llvm::StringRef Filename
std::error_code& EC
sys::fs::OpenFlags Flags

ToolOutputFile(llvm::StringRef Filename, int FD)

Declared at: llvm/include/llvm/Support/ToolOutputFile.h:50

Parameters

llvm::StringRef Filename
int FD

void keep()

Description

Indicate that the tool's job wrt this output file has been successful and the file should not be deleted.

Declared at: llvm/include/llvm/Support/ToolOutputFile.h:57

llvm::raw_fd_ostream& os()

Description

Return the contained raw_fd_ostream.

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