[Mlir-commits] [mlir] [MLIR][NVVM] Reduce the scope of the LLVM_HAS_NVPTX_TARGET guard (PR #97349)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Mon Jul 1 14:10:52 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 7840c0066837797cdeb62aab63044b964aa7f372 2d05903b35ab54d36ff3b3f004e5fa3c0db6ba2e -- mlir/lib/Dialect/GPU/Transforms/ModuleToBinary.cpp mlir/lib/Target/LLVM/NVVM/Target.cpp
``````````

</details>

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

``````````diff
diff --git a/mlir/lib/Target/LLVM/NVVM/Target.cpp b/mlir/lib/Target/LLVM/NVVM/Target.cpp
index c32ccf90cb..e608d26e8d 100644
--- a/mlir/lib/Target/LLVM/NVVM/Target.cpp
+++ b/mlir/lib/Target/LLVM/NVVM/Target.cpp
@@ -531,7 +531,7 @@ NVPTXSerializer::moduleToObject(llvm::Module &llvmModule) {
   if (targetOptions.getCompilationTarget() == gpu::CompilationTarget::Offload)
     return SerializeGPUModuleBase::moduleToObject(llvmModule);
 
-#if ! LLVM_HAS_NVPTX_TARGET
+#if !LLVM_HAS_NVPTX_TARGET
   getOperation()->emitError(
       "The `NVPTX` target was not built. Please enable it when building LLVM.");
   return std::nullopt;

``````````

</details>


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


More information about the Mlir-commits mailing list