diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2014-06-13 17:20:50 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2014-06-13 17:20:50 +0000 |
commit | 71de0b61cb8b70f1c5662bc5252b9d62c060e28e (patch) | |
tree | 717173aae0e715fda33bb8816f7cdbe27df41087 /clang/lib/Basic/VirtualFileSystem.cpp | |
parent | 2a826e40fa51fcae4adb564d789cafe95776e0bb (diff) | |
download | bcm5719-llvm-71de0b61cb8b70f1c5662bc5252b9d62c060e28e.tar.gz bcm5719-llvm-71de0b61cb8b70f1c5662bc5252b9d62c060e28e.zip |
Update for llvm api change.
llvm-svn: 210921
Diffstat (limited to 'clang/lib/Basic/VirtualFileSystem.cpp')
-rw-r--r-- | clang/lib/Basic/VirtualFileSystem.cpp | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/clang/lib/Basic/VirtualFileSystem.cpp b/clang/lib/Basic/VirtualFileSystem.cpp index 5389de727a6..63302b741e7 100644 --- a/clang/lib/Basic/VirtualFileSystem.cpp +++ b/clang/lib/Basic/VirtualFileSystem.cpp @@ -14,6 +14,7 @@ #include "llvm/ADT/iterator_range.h" #include "llvm/ADT/STLExtras.h" #include "llvm/ADT/StringExtras.h" +#include "llvm/Support/Errc.h" #include "llvm/Support/MemoryBuffer.h" #include "llvm/Support/Path.h" #include "llvm/Support/YAMLParser.h" @@ -198,10 +199,10 @@ ErrorOr<Status> OverlayFileSystem::status(const Twine &Path) { // FIXME: handle symlinks that cross file systems for (iterator I = overlays_begin(), E = overlays_end(); I != E; ++I) { ErrorOr<Status> Status = (*I)->status(Path); - if (Status || Status.getError() != std::errc::no_such_file_or_directory) + if (Status || Status.getError() != llvm::errc::no_such_file_or_directory) return Status; } - return std::make_error_code(std::errc::no_such_file_or_directory); + return make_error_code(llvm::errc::no_such_file_or_directory); } std::error_code @@ -210,10 +211,10 @@ OverlayFileSystem::openFileForRead(const llvm::Twine &Path, // FIXME: handle symlinks that cross file systems for (iterator I = overlays_begin(), E = overlays_end(); I != E; ++I) { std::error_code EC = (*I)->openFileForRead(Path, Result); - if (!EC || EC != std::errc::no_such_file_or_directory) + if (!EC || EC != llvm::errc::no_such_file_or_directory) return EC; } - return std::make_error_code(std::errc::no_such_file_or_directory); + return make_error_code(llvm::errc::no_such_file_or_directory); } //===-----------------------------------------------------------------------===/ @@ -745,17 +746,17 @@ ErrorOr<Entry *> VFSFromYAML::lookupPath(const Twine &Path_) { return EC; if (Path.empty()) - return std::make_error_code(std::errc::invalid_argument); + return make_error_code(llvm::errc::invalid_argument); sys::path::const_iterator Start = sys::path::begin(Path); sys::path::const_iterator End = sys::path::end(Path); for (std::vector<Entry *>::iterator I = Roots.begin(), E = Roots.end(); I != E; ++I) { ErrorOr<Entry *> Result = lookupPath(Start, End, *I); - if (Result || Result.getError() != std::errc::no_such_file_or_directory) + if (Result || Result.getError() != llvm::errc::no_such_file_or_directory) return Result; } - return std::make_error_code(std::errc::no_such_file_or_directory); + return make_error_code(llvm::errc::no_such_file_or_directory); } ErrorOr<Entry *> VFSFromYAML::lookupPath(sys::path::const_iterator Start, @@ -768,7 +769,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 std::make_error_code(std::errc::no_such_file_or_directory); + return make_error_code(llvm::errc::no_such_file_or_directory); ++Start; @@ -779,16 +780,16 @@ ErrorOr<Entry *> VFSFromYAML::lookupPath(sys::path::const_iterator Start, DirectoryEntry *DE = dyn_cast<DirectoryEntry>(From); if (!DE) - return std::make_error_code(std::errc::not_a_directory); + return make_error_code(llvm::errc::not_a_directory); for (DirectoryEntry::iterator I = DE->contents_begin(), E = DE->contents_end(); I != E; ++I) { ErrorOr<Entry *> Result = lookupPath(Start, End, *I); - if (Result || Result.getError() != std::errc::no_such_file_or_directory) + if (Result || Result.getError() != llvm::errc::no_such_file_or_directory) return Result; } - return std::make_error_code(std::errc::no_such_file_or_directory); + return make_error_code(llvm::errc::no_such_file_or_directory); } ErrorOr<Status> VFSFromYAML::status(const Twine &Path) { @@ -822,7 +823,7 @@ VFSFromYAML::openFileForRead(const Twine &Path, FileEntry *F = dyn_cast<FileEntry>(*E); if (!F) // FIXME: errc::not_a_file? - return std::make_error_code(std::errc::invalid_argument); + return make_error_code(llvm::errc::invalid_argument); if (std::error_code EC = ExternalFS->openFileForRead(F->getExternalContentsPath(), Result)) |