mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-28 06:32:09 +00:00
Remove unique_file now that it is unused.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185728 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
200c748a86
commit
01c9d28fec
@ -545,36 +545,6 @@ bool status_known(file_status s);
|
||||
/// platform specific error_code.
|
||||
error_code status_known(const Twine &path, bool &result);
|
||||
|
||||
/// @brief Generate a unique path and open it as a file.
|
||||
///
|
||||
/// Generates a unique path suitable for a temporary file and then opens it as a
|
||||
/// file. The name is based on \a model with '%' replaced by a random char in
|
||||
/// [0-9a-f]. If \a model is not an absolute path, a suitable temporary
|
||||
/// directory will be prepended.
|
||||
///
|
||||
/// This is an atomic operation. Either the file is created and opened, or the
|
||||
/// file system is left untouched.
|
||||
///
|
||||
/// clang-%%-%%-%%-%%-%%.s => /tmp/clang-a0-b1-c2-d3-e4.s
|
||||
///
|
||||
/// @param model Name to base unique path off of.
|
||||
/// @param result_fd Set to the opened file's file descriptor.
|
||||
/// @param result_path Set to the opened file's absolute path.
|
||||
/// @param makeAbsolute If true and \a model is not an absolute path, a temp
|
||||
/// directory will be prepended.
|
||||
/// @param mode Set to the file open mode; since this is most often used for
|
||||
/// temporary files, mode defaults to owner_read | owner_write.
|
||||
/// @returns errc::success if result_{fd,path} have been successfully set,
|
||||
/// otherwise a platform specific error_code.
|
||||
error_code unique_file(const Twine &model, int &result_fd,
|
||||
SmallVectorImpl<char> &result_path,
|
||||
bool makeAbsolute = true,
|
||||
unsigned mode = owner_read | owner_write);
|
||||
|
||||
/// @brief Simpler version for clients that don't want an open file.
|
||||
error_code unique_file(const Twine &Model, SmallVectorImpl<char> &ResultPath,
|
||||
bool MakeAbsolute = true);
|
||||
|
||||
/// @brief Create a uniquely named file.
|
||||
///
|
||||
/// Generates a unique path suitable for a temporary file and then opens it as a
|
||||
|
@ -637,23 +637,6 @@ bool is_relative(const Twine &path) {
|
||||
|
||||
namespace fs {
|
||||
|
||||
// This is a mkostemps with a different pattern. Unfortunatelly OS X (ond *BSD)
|
||||
// don't have it. We should try using mkostemps on systems that have it.
|
||||
error_code unique_file(const Twine &Model, int &ResultFD,
|
||||
SmallVectorImpl<char> &ResultPath, bool MakeAbsolute,
|
||||
unsigned Mode) {
|
||||
return createUniqueEntity(Model, ResultFD, ResultPath, MakeAbsolute, Mode,
|
||||
FS_File);
|
||||
}
|
||||
|
||||
// This is a mktemp with a differet pattern. We use createUniqueEntity mostly
|
||||
// for consistency. We should try using mktemp.
|
||||
error_code unique_file(const Twine &Model, SmallVectorImpl<char> &ResultPath,
|
||||
bool MakeAbsolute) {
|
||||
int Dummy;
|
||||
return createUniqueEntity(Model, Dummy, ResultPath, MakeAbsolute, 0, FS_Name);
|
||||
}
|
||||
|
||||
error_code createUniqueFile(const Twine &Model, int &ResultFd,
|
||||
SmallVectorImpl<char> &ResultPath, unsigned Mode) {
|
||||
return createUniqueEntity(Model, ResultFd, ResultPath, false, Mode, FS_File);
|
||||
|
Loading…
x
Reference in New Issue
Block a user