[PATCH] D120299: [VFS] Use generic_category for errors generated from the VFS

Ben Barham via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 22 15:09:12 PST 2022


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGed4f0cb87878: [VFS] Use generic_category for errors generated from the VFS (authored by bnbarham).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D120299/new/

https://reviews.llvm.org/D120299

Files:
  llvm/lib/Support/VirtualFileSystem.cpp


Index: llvm/lib/Support/VirtualFileSystem.cpp
===================================================================
--- llvm/lib/Support/VirtualFileSystem.cpp
+++ llvm/lib/Support/VirtualFileSystem.cpp
@@ -485,8 +485,7 @@
     }
 
     if (IsFirstTime && CurrentDirIter == directory_iterator())
-      return std::error_code(static_cast<int>(errc::no_such_file_or_directory),
-                             std::system_category());
+      return errc::no_such_file_or_directory;
     return {};
   }
 
@@ -1285,8 +1284,7 @@
   }
 
   if (!S->isDirectory()) {
-    EC = std::error_code(static_cast<int>(errc::not_a_directory),
-                         std::system_category());
+    EC = errc::not_a_directory;
     return {};
   }
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D120299.410653.patch
Type: text/x-patch
Size: 730 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220222/df75e0cf/attachment.bin>


More information about the llvm-commits mailing list