diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2013-06-20 12:04:39 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2013-06-20 12:04:39 +0000 |
commit | a18b281791d7cc6e966a4f472f2176e4c4755e9b (patch) | |
tree | f669ea20ca334896c93cfc1f6ba2bad0ba211b0a /tools/llvm-ar/ArchiveWriter.cpp | |
parent | 436cd0cfcf227ba1010b96d9ecb1d62e391f3059 (diff) | |
download | external_llvm-a18b281791d7cc6e966a4f472f2176e4c4755e9b.zip external_llvm-a18b281791d7cc6e966a4f472f2176e4c4755e9b.tar.gz external_llvm-a18b281791d7cc6e966a4f472f2176e4c4755e9b.tar.bz2 |
Use the simpler sys::fs::exists.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184413 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvm-ar/ArchiveWriter.cpp')
-rw-r--r-- | tools/llvm-ar/ArchiveWriter.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/tools/llvm-ar/ArchiveWriter.cpp b/tools/llvm-ar/ArchiveWriter.cpp index ada45f5..3656ad4 100644 --- a/tools/llvm-ar/ArchiveWriter.cpp +++ b/tools/llvm-ar/ArchiveWriter.cpp @@ -156,8 +156,7 @@ Archive::fillHeader(const ArchiveMember &mbr, ArchiveMemberHeader& hdr, // of extracting the necessary flags and information from the file. bool Archive::addFileBefore(StringRef filePath, iterator where, std::string *ErrMsg) { - bool Exists; - if (sys::fs::exists(filePath.str(), Exists) || !Exists) { + if (!sys::fs::exists(filePath)) { if (ErrMsg) *ErrMsg = "Can not add a non-existent file to archive"; return true; |