[Openmp-commits] [openmp] [Libomptarget] Pass '-Werror=global-constructors' to the libomptarget build (PR #88531)

via Openmp-commits openmp-commits at lists.llvm.org
Fri Apr 12 09:10:27 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 fad14707b73d6387e6276507e1c5726e67f08cd6 8b55f30cab281e08e8f2189cc0ac2dc2eb656819 -- openmp/libomptarget/plugins-nextgen/common/src/PluginInterface.cpp openmp/libomptarget/src/device.cpp openmp/libomptarget/tools/kernelreplay/llvm-omp-kernel-replay.cpp
``````````

</details>

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

``````````diff
diff --git a/openmp/libomptarget/plugins-nextgen/common/src/PluginInterface.cpp b/openmp/libomptarget/plugins-nextgen/common/src/PluginInterface.cpp
index 0b66e830b8..30a931aea6 100644
--- a/openmp/libomptarget/plugins-nextgen/common/src/PluginInterface.cpp
+++ b/openmp/libomptarget/plugins-nextgen/common/src/PluginInterface.cpp
@@ -568,8 +568,9 @@ Error GenericKernelTy::launch(GenericDeviceTy &GenericDevice, void **ArgPtrs,
   if (getRecordReplay().isRecording()) {
     getRecordReplay().saveImage(getName(), getImage());
     getRecordReplay().saveKernelInput(getName(), getImage());
-    getRecordReplay().saveKernelDescr(getName(), Ptrs.data(), KernelArgs.NumArgs,
-                                 NumBlocks, NumThreads, KernelArgs.Tripcount);
+    getRecordReplay().saveKernelDescr(getName(), Ptrs.data(),
+                                      KernelArgs.NumArgs, NumBlocks, NumThreads,
+                                      KernelArgs.Tripcount);
   }
 
   if (auto Err =
@@ -1634,7 +1635,7 @@ int32_t GenericPluginTy::initialize_record_replay(int32_t DeviceId,
                : RecordReplayTy::RRStatusTy::RRReplaying;
 
   if (auto Err = getRecordReplay().init(&Device, MemorySize, VAddr, Status,
-                                   SaveOutput, ReqPtrArgOffset)) {
+                                        SaveOutput, ReqPtrArgOffset)) {
     REPORT("WARNING RR did not intialize RR-properly with %lu bytes"
            "(Error: %s)\n",
            MemorySize, toString(std::move(Err)).data());

``````````

</details>


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


More information about the Openmp-commits mailing list