Use error_code() instead of error_code::succes()

There is no std::error_code::success, so this removes much of the noise
in transitioning to std::error_code.

llvm-svn: 209949
This commit is contained in:
Rafael Espindola
2014-05-31 01:26:30 +00:00
parent 63ed1a3519
commit cb82dfb11c
3 changed files with 8 additions and 8 deletions

View File

@@ -142,7 +142,7 @@ error_code RealFile::close() {
if (::close(FD))
return error_code(errno, system_category());
FD = -1;
return error_code::success();
return error_code();
}
void RealFile::setName(StringRef Name) {
@@ -175,7 +175,7 @@ error_code RealFileSystem::openFileForRead(const Twine &Name,
return EC;
Result.reset(new RealFile(FD));
Result->setName(Name.str());
return error_code::success();
return error_code();
}
IntrusiveRefCntPtr<FileSystem> vfs::getRealFileSystem() {
@@ -829,7 +829,7 @@ error_code VFSFromYAML::openFileForRead(const Twine &Path,
if (!F->useExternalName(UseExternalNames))
Result->setName(Path.str());
return error_code::success();
return error_code();
}
IntrusiveRefCntPtr<FileSystem>