[llvm] [llvm][Support] Make sys::fs::file_t into a seperate type (PR #160588)
    via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Wed Sep 24 12:32:05 PDT 2025
    
    
  
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff origin/main HEAD --extensions cpp,h,inc -- llvm/include/llvm/Support/File.h llvm/include/llvm/Support/FileSystem.h llvm/include/llvm/Support/MemoryBuffer.h llvm/lib/CAS/MappedFileRegionArena.cpp llvm/lib/Object/ArchiveWriter.cpp llvm/lib/Support/FileUtilities.cpp llvm/lib/Support/Unix/Path.inc llvm/lib/Support/VirtualFileSystem.cpp llvm/lib/Support/Windows/Path.inc llvm/unittests/Support/MemoryBufferTest.cpp
``````````
:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/Support/Unix/Path.inc b/llvm/lib/Support/Unix/Path.inc
index 56b998d0d..49eea46da 100644
--- a/llvm/lib/Support/Unix/Path.inc
+++ b/llvm/lib/Support/Unix/Path.inc
@@ -1202,7 +1202,8 @@ Expected<size_t> readNativeFile(file_t FD, MutableArrayRef<char> Buf) {
 #else
   size_t Size = Buf.size();
 #endif
-  ssize_t NumRead = sys::RetryAfterSignal(-1, ::read, FD.get(), Buf.data(), Size);
+  ssize_t NumRead =
+      sys::RetryAfterSignal(-1, ::read, FD.get(), Buf.data(), Size);
   if (NumRead == -1)
     return errorCodeToError(errnoAsErrorCode());
 // The underlying operation on these platforms allow opening directories
diff --git a/llvm/lib/Support/VirtualFileSystem.cpp b/llvm/lib/Support/VirtualFileSystem.cpp
index e71a5b691..20460213f 100644
--- a/llvm/lib/Support/VirtualFileSystem.cpp
+++ b/llvm/lib/Support/VirtualFileSystem.cpp
@@ -53,8 +53,8 @@
 using namespace llvm;
 using namespace llvm::vfs;
 
-using llvm::sys::fs::file_t;
 using llvm::sys::fs::file_status;
+using llvm::sys::fs::file_t;
 using llvm::sys::fs::file_type;
 using llvm::sys::fs::perms;
 using llvm::sys::fs::UniqueID;
``````````
</details>
https://github.com/llvm/llvm-project/pull/160588
    
    
More information about the llvm-commits
mailing list