diff --git a/clang/lib/Frontend/CompilerInstance.cpp b/clang/lib/Frontend/CompilerInstance.cpp index cdf29ec3c4ef..740524ce2c52 100644 --- a/clang/lib/Frontend/CompilerInstance.cpp +++ b/clang/lib/Frontend/CompilerInstance.cpp @@ -641,7 +641,7 @@ std::unique_ptr CompilerInstance::createOutputFile( if (llvm::sys::fs::exists(Status)) { // Fail early if we can't write to the final destination. if (!llvm::sys::fs::can_write(OutputPath)) { - Error = std::make_error_code(std::errc::operation_not_permitted); + Error = make_error_code(llvm::errc::operation_not_permitted); return nullptr; }