summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/Windows/Path.inc
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Support/Windows/Path.inc')
-rw-r--r--llvm/lib/Support/Windows/Path.inc4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Support/Windows/Path.inc b/llvm/lib/Support/Windows/Path.inc
index 8baa263cb85..f04900c0dda 100644
--- a/llvm/lib/Support/Windows/Path.inc
+++ b/llvm/lib/Support/Windows/Path.inc
@@ -810,7 +810,7 @@ error_code openFileForRead(const Twine &Name, int &ResultFD) {
if (EC != windows_error::access_denied)
return EC;
if (is_directory(Name))
- return error_code(errc::is_a_directory, posix_category());
+ return make_error_code(errc::is_a_directory);
return EC;
}
@@ -861,7 +861,7 @@ error_code openFileForWrite(const Twine &Name, int &ResultFD,
if (EC != windows_error::access_denied)
return EC;
if (is_directory(Name))
- return error_code(errc::is_a_directory, posix_category());
+ return make_error_code(errc::is_a_directory);
return EC;
}
OpenPOWER on IntegriCloud