diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2013-06-28 01:05:47 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2013-06-28 01:05:47 +0000 |
commit | 1842482359c1c578be86cdfa3e12149247c551e8 (patch) | |
tree | c014858f1acf41700a3d95355659d6ac17849511 | |
parent | 12ecb331afd2764939f4d65e267979d823ff988e (diff) | |
download | bcm5719-llvm-1842482359c1c578be86cdfa3e12149247c551e8.tar.gz bcm5719-llvm-1842482359c1c578be86cdfa3e12149247c551e8.zip |
Don't ask for a mode when we are not keeping the file.
llvm-svn: 185123
-rw-r--r-- | llvm/include/llvm/Support/FileSystem.h | 3 | ||||
-rw-r--r-- | llvm/lib/Support/Path.cpp | 4 |
2 files changed, 3 insertions, 4 deletions
diff --git a/llvm/include/llvm/Support/FileSystem.h b/llvm/include/llvm/Support/FileSystem.h index c29d142ab11..3244517644e 100644 --- a/llvm/include/llvm/Support/FileSystem.h +++ b/llvm/include/llvm/Support/FileSystem.h @@ -573,8 +573,7 @@ error_code unique_file(const Twine &model, int &result_fd, /// @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, - unsigned Mode = owner_read | owner_write); + bool MakeAbsolute = true); error_code createUniqueDirectory(const Twine &Prefix, SmallVectorImpl<char> &ResultPath); diff --git a/llvm/lib/Support/Path.cpp b/llvm/lib/Support/Path.cpp index a631c760fd7..1f4f44acb08 100644 --- a/llvm/lib/Support/Path.cpp +++ b/llvm/lib/Support/Path.cpp @@ -626,12 +626,12 @@ bool is_relative(const Twine &path) { namespace fs { error_code unique_file(const Twine &Model, SmallVectorImpl<char> &ResultPath, - bool MakeAbsolute, unsigned Mode) { + bool MakeAbsolute) { // FIXME: This is really inefficient. unique_path creates a path an tries to // open it. We should factor the code so that we just don't create/open the // file when we don't need it. int FD; - error_code Ret = unique_file(Model, FD, ResultPath, MakeAbsolute, Mode); + error_code Ret = unique_file(Model, FD, ResultPath, MakeAbsolute, all_read); if (Ret) return Ret; |