[Mlir-commits] [mlir] [mlir] fix overflow warning when generating embedded libdevice (PR #125801)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Wed Feb 5 01:15:11 PST 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 19a41358ff859f8d4d71659ea2715f84b682502c 4ce95feadb942bfb9c3975f7a90f36e051b576e7 --extensions 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 7095f37d0c..b7d60ed59d 100644
--- a/mlir/lib/Target/LLVM/NVVM/Target.cpp
+++ b/mlir/lib/Target/LLVM/NVVM/Target.cpp
@@ -159,9 +159,9 @@ LogicalResult SerializeGPUModuleBase::appendStandardLibs() {
// Allocate a resource using one of the UnManagedResourceBlob method to wrap
// the embedded data.
- auto unmanagedBlob =
- UnmanagedAsmResourceBlob::allocateInferAlign(ArrayRef<char>{
- (const char *)_mlir_embedded_libdevice, _mlir_embedded_libdevice_size});
+ auto unmanagedBlob = UnmanagedAsmResourceBlob::allocateInferAlign(
+ ArrayRef<char>{(const char *)_mlir_embedded_libdevice,
+ _mlir_embedded_libdevice_size});
librariesToLink.push_back(DenseResourceElementsAttr::get(
type, resourceManager.insert("_mlir_embedded_libdevice",
std::move(unmanagedBlob))));
``````````
</details>
https://github.com/llvm/llvm-project/pull/125801
More information about the Mlir-commits
mailing list