diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2014-05-31 02:23:01 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2014-05-31 02:23:01 +0000 |
commit | fd148d0b6f3e4006273c42bf3e35b101681dce57 (patch) | |
tree | 6fa5f810cbdd81281f6c03f3cf906ce9afe36f7d /clang/lib/Basic | |
parent | 4461de208abfe5632f6b3f5e1d910829835e7baa (diff) | |
download | bcm5719-llvm-fd148d0b6f3e4006273c42bf3e35b101681dce57.tar.gz bcm5719-llvm-fd148d0b6f3e4006273c42bf3e35b101681dce57.zip |
Use make_error_code in preparation for making errc an enum class.
llvm-svn: 209956
Diffstat (limited to 'clang/lib/Basic')
-rw-r--r-- | clang/lib/Basic/VirtualFileSystem.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/clang/lib/Basic/VirtualFileSystem.cpp b/clang/lib/Basic/VirtualFileSystem.cpp index 1892839e2b1..3bca96449db 100644 --- a/clang/lib/Basic/VirtualFileSystem.cpp +++ b/clang/lib/Basic/VirtualFileSystem.cpp @@ -201,7 +201,7 @@ ErrorOr<Status> OverlayFileSystem::status(const Twine &Path) { if (Status || Status.getError() != errc::no_such_file_or_directory) return Status; } - return error_code(errc::no_such_file_or_directory, system_category()); + return make_error_code(errc::no_such_file_or_directory); } error_code OverlayFileSystem::openFileForRead(const llvm::Twine &Path, @@ -212,7 +212,7 @@ error_code OverlayFileSystem::openFileForRead(const llvm::Twine &Path, if (!EC || EC != errc::no_such_file_or_directory) return EC; } - return error_code(errc::no_such_file_or_directory, system_category()); + return make_error_code(errc::no_such_file_or_directory); } //===-----------------------------------------------------------------------===/ @@ -744,7 +744,7 @@ ErrorOr<Entry *> VFSFromYAML::lookupPath(const Twine &Path_) { return EC; if (Path.empty()) - return error_code(errc::invalid_argument, system_category()); + return make_error_code(errc::invalid_argument); sys::path::const_iterator Start = sys::path::begin(Path); sys::path::const_iterator End = sys::path::end(Path); @@ -754,7 +754,7 @@ ErrorOr<Entry *> VFSFromYAML::lookupPath(const Twine &Path_) { if (Result || Result.getError() != errc::no_such_file_or_directory) return Result; } - return error_code(errc::no_such_file_or_directory, system_category()); + return make_error_code(errc::no_such_file_or_directory); } ErrorOr<Entry *> VFSFromYAML::lookupPath(sys::path::const_iterator Start, @@ -767,7 +767,7 @@ ErrorOr<Entry *> VFSFromYAML::lookupPath(sys::path::const_iterator Start, if (CaseSensitive ? !Start->equals(From->getName()) : !Start->equals_lower(From->getName())) // failure to match - return error_code(errc::no_such_file_or_directory, system_category()); + return make_error_code(errc::no_such_file_or_directory); ++Start; @@ -778,7 +778,7 @@ ErrorOr<Entry *> VFSFromYAML::lookupPath(sys::path::const_iterator Start, DirectoryEntry *DE = dyn_cast<DirectoryEntry>(From); if (!DE) - return error_code(errc::not_a_directory, system_category()); + return make_error_code(errc::not_a_directory); for (DirectoryEntry::iterator I = DE->contents_begin(), E = DE->contents_end(); @@ -787,7 +787,7 @@ ErrorOr<Entry *> VFSFromYAML::lookupPath(sys::path::const_iterator Start, if (Result || Result.getError() != errc::no_such_file_or_directory) return Result; } - return error_code(errc::no_such_file_or_directory, system_category()); + return make_error_code(errc::no_such_file_or_directory); } ErrorOr<Status> VFSFromYAML::status(const Twine &Path) { @@ -820,7 +820,7 @@ error_code VFSFromYAML::openFileForRead(const Twine &Path, FileEntry *F = dyn_cast<FileEntry>(*E); if (!F) // FIXME: errc::not_a_file? - return error_code(errc::invalid_argument, system_category()); + return make_error_code(errc::invalid_argument); if (error_code EC = ExternalFS->openFileForRead(F->getExternalContentsPath(), Result)) |