[clang] [llvm] [SystemZ][z/OS] Open text files in text mode (PR #109972)

via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 25 05:48:25 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 12285cca5ed713dfd483bd96422a5607b8af0085 3325960ce7b1da97c7ab6b8d24686dec349dae4d --extensions cpp -- clang/lib/Driver/OffloadBundler.cpp llvm/tools/llvm-link/llvm-link.cpp llvm/tools/llvm-objdump/SourcePrinter.cpp llvm/tools/llvm-rc/llvm-rc.cpp llvm/tools/llvm-readtapi/llvm-readtapi.cpp llvm/tools/llvm-strings/llvm-strings.cpp llvm/utils/split-file/split-file.cpp
``````````

</details>

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

``````````diff
diff --git a/clang/lib/Driver/OffloadBundler.cpp b/clang/lib/Driver/OffloadBundler.cpp
index 12378f437c..687a38333e 100644
--- a/clang/lib/Driver/OffloadBundler.cpp
+++ b/clang/lib/Driver/OffloadBundler.cpp
@@ -1392,7 +1392,8 @@ Error OffloadBundler::BundleFiles() {
 Error OffloadBundler::UnbundleFiles() {
   // Open Input file.
   ErrorOr<std::unique_ptr<MemoryBuffer>> CodeOrErr =
-      MemoryBuffer::getFileOrSTDIN(BundlerConfig.InputFileNames.front(), /*IsText=*/true);
+      MemoryBuffer::getFileOrSTDIN(BundlerConfig.InputFileNames.front(),
+                                   /*IsText=*/true);
   if (std::error_code EC = CodeOrErr.getError())
     return createFileError(BundlerConfig.InputFileNames.front(), EC);
 
diff --git a/llvm/tools/llvm-link/llvm-link.cpp b/llvm/tools/llvm-link/llvm-link.cpp
index 9eb9b9bc6c..34bb6ce30b 100644
--- a/llvm/tools/llvm-link/llvm-link.cpp
+++ b/llvm/tools/llvm-link/llvm-link.cpp
@@ -330,8 +330,8 @@ static bool importFunctions(const char *argv0, Module &DestModule) {
 
   auto ModuleLoader = [&DestModule](const char *argv0,
                                     const std::string &Identifier) {
-    std::unique_ptr<MemoryBuffer> Buffer =
-        ExitOnErr(errorOrToExpected(MemoryBuffer::getFileOrSTDIN(Identifier, /*IsText=*/true)));
+    std::unique_ptr<MemoryBuffer> Buffer = ExitOnErr(errorOrToExpected(
+        MemoryBuffer::getFileOrSTDIN(Identifier, /*IsText=*/true)));
     return loadFile(argv0, std::move(Buffer), DestModule.getContext(), false);
   };
 

``````````

</details>


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


More information about the llvm-commits mailing list