[Mlir-commits] [mlir] [MLIR][DLTI] Add mangling style (PR #125875)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Sun Feb 23 18:48:42 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 3aef599d072bea70fb07a6e47bdfb49099e2199c 735628aa9e28ab4baf485d0d398dc164ce5b2ce2 --extensions h,cpp -- mlir/include/mlir/Interfaces/DataLayoutInterfaces.h mlir/lib/Dialect/DLTI/DLTI.cpp mlir/lib/Interfaces/DataLayoutInterfaces.cpp mlir/lib/Target/LLVMIR/DataLayoutImporter.cpp mlir/lib/Target/LLVMIR/DataLayoutImporter.h mlir/lib/Target/LLVMIR/ModuleTranslation.cpp mlir/test/lib/Dialect/DLTI/TestDataLayoutQuery.cpp mlir/unittests/Interfaces/DataLayoutInterfacesTest.cpp
``````````

</details>

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

``````````diff
diff --git a/mlir/lib/Interfaces/DataLayoutInterfaces.cpp b/mlir/lib/Interfaces/DataLayoutInterfaces.cpp
index feb0e17b70..2b35e39a24 100644
--- a/mlir/lib/Interfaces/DataLayoutInterfaces.cpp
+++ b/mlir/lib/Interfaces/DataLayoutInterfaces.cpp
@@ -260,11 +260,10 @@ mlir::detail::getDefaultAllocaMemorySpace(DataLayoutEntryInterface entry) {
 
 // Returns the mangling mode if specified in the given entry.
 // If the entry is empty, an empty attribute is returned.
-Attribute
-mlir::detail::getDefaultManglingMode(DataLayoutEntryInterface entry) {
+Attribute mlir::detail::getDefaultManglingMode(DataLayoutEntryInterface entry) {
   if (entry == DataLayoutEntryInterface())
     return Attribute();
-  
+
   return entry.getValue();
 }
 
diff --git a/mlir/lib/Target/LLVMIR/DataLayoutImporter.h b/mlir/lib/Target/LLVMIR/DataLayoutImporter.h
index f254b59c20..206c8dd486 100644
--- a/mlir/lib/Target/LLVMIR/DataLayoutImporter.h
+++ b/mlir/lib/Target/LLVMIR/DataLayoutImporter.h
@@ -102,7 +102,7 @@ private:
 
   /// Adds an mangling mode entry if there is none yet.
   LogicalResult tryToEmplaceManglingModeEntry(StringRef token,
-                                               llvm::StringLiteral manglingKey);
+                                              llvm::StringLiteral manglingKey);
 
   /// Adds a stack alignment entry if there is none yet.
   LogicalResult tryToEmplaceStackAlignmentEntry(StringRef token);
diff --git a/mlir/test/lib/Dialect/DLTI/TestDataLayoutQuery.cpp b/mlir/test/lib/Dialect/DLTI/TestDataLayoutQuery.cpp
index 5f8f2c88b3..eae563b48c 100644
--- a/mlir/test/lib/Dialect/DLTI/TestDataLayoutQuery.cpp
+++ b/mlir/test/lib/Dialect/DLTI/TestDataLayoutQuery.cpp
@@ -73,10 +73,9 @@ struct TestDataLayoutQuery
                                 allocaMemorySpace == Attribute()
                                     ? builder.getUI32IntegerAttr(0)
                                     : allocaMemorySpace),
-           builder.getNamedAttr("mangling_mode",
-                                manglingMode == Attribute()
-                                    ? builder.getStringAttr("")
-                                    : manglingMode),
+           builder.getNamedAttr("mangling_mode", manglingMode == Attribute()
+                                                     ? builder.getStringAttr("")
+                                                     : manglingMode),
            builder.getNamedAttr("program_memory_space",
                                 programMemorySpace == Attribute()
                                     ? builder.getUI32IntegerAttr(0)

``````````

</details>


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


More information about the Mlir-commits mailing list