[llvm] r184413 - Use the simpler sys::fs::exists.
Rafael Espindola
rafael.espindola at gmail.com
Thu Jun 20 05:04:39 PDT 2013
Author: rafael
Date: Thu Jun 20 07:04:39 2013
New Revision: 184413
URL: http://llvm.org/viewvc/llvm-project?rev=184413&view=rev
Log:
Use the simpler sys::fs::exists.
Modified:
llvm/trunk/tools/llvm-ar/ArchiveWriter.cpp
Modified: llvm/trunk/tools/llvm-ar/ArchiveWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-ar/ArchiveWriter.cpp?rev=184413&r1=184412&r2=184413&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-ar/ArchiveWriter.cpp (original)
+++ llvm/trunk/tools/llvm-ar/ArchiveWriter.cpp Thu Jun 20 07:04:39 2013
@@ -156,8 +156,7 @@ Archive::fillHeader(const ArchiveMember
// 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;
More information about the llvm-commits
mailing list