llvm::sys::RemoveFileOnSignal

This function registers signal handlers to ensure that if a signal gets delivered that the named file is removed. Remove a file if a fatal signal occurs.

Synopsis

Declared in <llvm/Support/Signals.h>

bool
RemoveFileOnSignal(
    StringRef Filename,
    std::string* ErrMsg = nullptr);

Return Value

True if registration failed; false on success.

Parameters

NameDescription
FilenamePath of the file to remove if a fatal signal occurs.
ErrMsgOptional string populated with an error message on failure.