Reapply [FastISel][X86] Emit more efficient instructions for integer constant materia...
[oota-llvm.git] / lib / Support / Windows / Path.inc
index 72f21ae5e68ede83f8e1cd0e32cc3529ab9c8f6c..a57f252fbfcf25e65a4742ccd2e0c8aacbe0d502 100644 (file)
@@ -163,11 +163,6 @@ std::error_code create_directory(const Twine &path, bool IgnoreExisting) {
   return std::error_code();
 }
 
-std::error_code normalize_separators(SmallVectorImpl<char> &Path) {
-  (void) Path;
-  return std::error_code();
-}
-
 // We can't use symbolic links for windows.
 std::error_code create_link(const Twine &to, const Twine &from) {
   // Get arguments.
@@ -196,7 +191,7 @@ std::error_code remove(const Twine &path, bool IgnoreNonExisting) {
 
   file_status ST;
   if (std::error_code EC = status(path, ST)) {
-    if (EC != std::errc::no_such_file_or_directory || !IgnoreNonExisting)
+    if (EC != errc::no_such_file_or_directory || !IgnoreNonExisting)
       return EC;
     return std::error_code();
   }
@@ -208,14 +203,14 @@ std::error_code remove(const Twine &path, bool IgnoreNonExisting) {
   if (ST.type() == file_type::directory_file) {
     if (!::RemoveDirectoryW(c_str(path_utf16))) {
       std::error_code EC = windows_error(::GetLastError());
-      if (EC != std::errc::no_such_file_or_directory || !IgnoreNonExisting)
+      if (EC != errc::no_such_file_or_directory || !IgnoreNonExisting)
         return EC;
     }
     return std::error_code();
   }
   if (!::DeleteFileW(c_str(path_utf16))) {
     std::error_code EC = windows_error(::GetLastError());
-    if (EC != std::errc::no_such_file_or_directory || !IgnoreNonExisting)
+    if (EC != errc::no_such_file_or_directory || !IgnoreNonExisting)
       return EC;
   }
   return std::error_code();
@@ -481,7 +476,7 @@ std::error_code mapped_file_region::init(int FD, bool CloseFD, uint64_t Offset)
         _close(FileDescriptor);
     } else
       ::CloseHandle(FileHandle);
-    return std::make_error_code(std::errc::invalid_argument);
+    return make_error_code(errc::invalid_argument);
   }
 
   DWORD flprotect;
@@ -617,7 +612,7 @@ mapped_file_region::mapped_file_region(int fd,
     if (closefd)
       _close(FileDescriptor);
     FileDescriptor = 0;
-    ec = std::make_error_code(std::errc::bad_file_descriptor);
+    ec = make_error_code(errc::bad_file_descriptor);
     return;
   }
 
@@ -779,7 +774,7 @@ std::error_code openFileForRead(const Twine &Name, int &ResultFD) {
     if (LastError != ERROR_ACCESS_DENIED)
       return EC;
     if (is_directory(Name))
-      return std::make_error_code(std::errc::is_a_directory);
+      return make_error_code(errc::is_a_directory);
     return EC;
   }
 
@@ -831,7 +826,7 @@ std::error_code openFileForWrite(const Twine &Name, int &ResultFD,
     if (LastError != ERROR_ACCESS_DENIED)
       return EC;
     if (is_directory(Name))
-      return std::make_error_code(std::errc::is_a_directory);
+      return make_error_code(errc::is_a_directory);
     return EC;
   }