[Mlir-commits] [mlir] MLIR->LLVMIR: Support creating constant arrays (and structs) from arbitary ArrayAttr for constants (PR #94143)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Sat Jun 1 23:09:12 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 0310f7f2d0c56a5697710251cec9803cbf7b4d56 76ab905a0c308f569e71ab622ed3baff94722650 -- mlir/include/mlir/Dialect/LLVMIR/LLVMTypes.h mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp mlir/lib/Dialect/LLVMIR/IR/LLVMTypes.cpp mlir/lib/Target/LLVMIR/ModuleTranslation.cpp
``````````

</details>

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

``````````diff
diff --git a/mlir/lib/Dialect/LLVMIR/IR/LLVMTypes.cpp b/mlir/lib/Dialect/LLVMIR/IR/LLVMTypes.cpp
index 2ba852c81f..8680b6f92f 100644
--- a/mlir/lib/Dialect/LLVMIR/IR/LLVMTypes.cpp
+++ b/mlir/lib/Dialect/LLVMIR/IR/LLVMTypes.cpp
@@ -492,9 +492,7 @@ ArrayRef<Type> LLVMStructType::getBody() const {
                         : getImpl()->getTypeList();
 }
 
-size_t LLVMStructType::getNumElements() const {
-  return getBody().size();
-}
+size_t LLVMStructType::getNumElements() const { return getBody().size(); }
 
 LogicalResult LLVMStructType::verify(function_ref<InFlightDiagnostic()>,
                                      StringRef, bool) {

``````````

</details>


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


More information about the Mlir-commits mailing list