summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--clang/lib/Lex/HeaderSearch.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/clang/lib/Lex/HeaderSearch.cpp b/clang/lib/Lex/HeaderSearch.cpp
index e9542b8d16a..7bc953ba1aa 100644
--- a/clang/lib/Lex/HeaderSearch.cpp
+++ b/clang/lib/Lex/HeaderSearch.cpp
@@ -30,6 +30,7 @@
#include "llvm/ADT/StringRef.h"
#include "llvm/Support/Allocator.h"
#include "llvm/Support/Capacity.h"
+#include "llvm/Support/Errc.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/FileSystem.h"
#include "llvm/Support/Path.h"
@@ -315,9 +316,9 @@ const FileEntry *HeaderSearch::getFileAndSuggestModule(
// For rare, surprising errors (e.g. "out of file handles"), diag the EC
// message.
std::error_code EC = File.getError();
- if (EC != std::errc::no_such_file_or_directory &&
- EC != std::errc::invalid_argument && EC != std::errc::is_a_directory &&
- EC != std::errc::not_a_directory) {
+ if (EC != llvm::errc::no_such_file_or_directory &&
+ EC != llvm::errc::invalid_argument &&
+ EC != llvm::errc::is_a_directory && EC != llvm::errc::not_a_directory) {
Diags.Report(IncludeLoc, diag::err_cannot_open_file)
<< FileName << EC.message();
}
OpenPOWER on IntegriCloud