mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-04-02 07:41:38 +00:00
Use the simpler sys::fs::exists.
llvm-svn: 184413
This commit is contained in:
parent
6c06452df3
commit
b974bbf1d3
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user