ΒΆstd::error_code createTemporaryFile(
const llvm::Twine& Prefix,
llvm::StringRef Suffix,
int& ResultFD,
SmallVectorImpl<char>& ResultPath)
std::error_code createTemporaryFile(
const llvm::Twine& Prefix,
llvm::StringRef Suffix,
int& ResultFD,
SmallVectorImpl<char>& ResultPath)
Description
Create a file in the system temporary directory. The filename is of the form prefix-random_chars.suffix. Since the directory is not know to the caller, Prefix and Suffix cannot have path separators. The files are created with mode 0600. This should be used for things like a temporary .s that is removed after running the assembler.
Declared at: llvm/include/llvm/Support/FileSystem.h:883
Parameters
- const llvm::Twine& Prefix
- llvm::StringRef Suffix
- int& ResultFD
- SmallVectorImpl<char>& ResultPath