[llvm] [Offload] Use new error code handling mechanism (PR #139275)

via llvm-commits llvm-commits at lists.llvm.org
Fri May 9 07:54:40 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 HEAD~1 HEAD --extensions h,cpp,hpp,inc -- offload/include/Shared/OffloadErrcodes.inc offload/plugins-nextgen/common/include/OffloadError.h offload/plugins-nextgen/common/src/OffloadError.cpp offload/liboffload/include/OffloadImpl.hpp offload/liboffload/include/generated/OffloadAPI.h offload/liboffload/include/generated/OffloadPrint.hpp offload/liboffload/src/OffloadImpl.cpp offload/plugins-nextgen/amdgpu/dynamic_hsa/hsa.h offload/plugins-nextgen/amdgpu/src/rtl.cpp offload/plugins-nextgen/common/include/PluginInterface.h offload/plugins-nextgen/common/src/GlobalHandler.cpp offload/plugins-nextgen/common/src/JIT.cpp offload/plugins-nextgen/common/src/PluginInterface.cpp offload/plugins-nextgen/common/src/RPC.cpp offload/plugins-nextgen/cuda/src/rtl.cpp offload/plugins-nextgen/host/src/rtl.cpp offload/tools/offload-tblgen/Generators.hpp offload/tools/offload-tblgen/offload-tblgen.cpp offload/unittests/OffloadAPI/kernel/olGetKernel.cpp offload/tools/offload-tblgen/MiscGen.cpp
``````````

</details>

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

``````````diff
diff --git a/offload/plugins-nextgen/common/src/JIT.cpp b/offload/plugins-nextgen/common/src/JIT.cpp
index fe2beaa88..c6159b58e 100644
--- a/offload/plugins-nextgen/common/src/JIT.cpp
+++ b/offload/plugins-nextgen/common/src/JIT.cpp
@@ -221,7 +221,8 @@ JITEngine::backend(Module &M, const std::string &ComputeUnitKind,
     raw_fd_stream FD(PostOptIRModuleFileName.get(), EC);
     if (EC)
       return createStringError(
-          plugin::ErrorCode::HOST_IO, "Could not open %s to write the post-opt IR module\n",
+          plugin::ErrorCode::HOST_IO,
+          "Could not open %s to write the post-opt IR module\n",
           PostOptIRModuleFileName.get().c_str());
     M.print(FD, nullptr);
   }

``````````

</details>


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


More information about the llvm-commits mailing list