[llvm] [SystemZ][z/OS] Query if a file is text and set the text flag accordingly (PR #109664)

via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 23 06:45:39 PDT 2024


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 6d216fb7b8546c04223e56002152c556926d1a1d 244ad16b5f64e38ef2470cf6cda1d0f8d3dc0d34 --extensions cpp,h -- llvm/include/llvm/Support/AutoConvert.h llvm/lib/Support/AutoConvert.cpp llvm/lib/Support/VirtualFileSystem.cpp
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/llvm/lib/Support/VirtualFileSystem.cpp b/llvm/lib/Support/VirtualFileSystem.cpp
index 50aa60363d..95a5aeefa6 100644
--- a/llvm/lib/Support/VirtualFileSystem.cpp
+++ b/llvm/lib/Support/VirtualFileSystem.cpp
@@ -328,8 +328,7 @@ RealFileSystem::openFileForRead(const Twine &Name) {
   auto OpenFlags = sys::fs::OF_None;
 #ifdef __MVS__
   // If the file is tagged with a text ccsid, it may require autoconversion.
-  llvm::ErrorOr<bool> IsFileText =
-      llvm::iszOSTextFile(Name.str().c_str());
+  llvm::ErrorOr<bool> IsFileText = llvm::iszOSTextFile(Name.str().c_str());
   if (IsFileText && *IsFileText)
     OpenFlags |= sys::fs::OF_Text;
 #endif

``````````

</details>


https://github.com/llvm/llvm-project/pull/109664


More information about the llvm-commits mailing list