[Mlir-commits] [clang] [llvm] [mlir] [CIR] split CIR and dependant MLIR out from clang-cpp.dll (PR #236403)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Wed Oct 28 05:45:27 PDT 2026


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 origin/main HEAD --extensions h,cpp -- mlir/include/mlir/Interfaces/SideEffectInterfaces.h mlir/lib/Interfaces/SideEffectInterfaces.cpp --diff_from_common_commit
``````````

:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:

</details>

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

``````````diff
diff --git a/mlir/include/mlir/Interfaces/SideEffectInterfaces.h b/mlir/include/mlir/Interfaces/SideEffectInterfaces.h
index 74ca0743b..5811a892e 100644
--- a/mlir/include/mlir/Interfaces/SideEffectInterfaces.h
+++ b/mlir/include/mlir/Interfaces/SideEffectInterfaces.h
@@ -205,7 +205,8 @@ protected:
 inline Resource *Resource::getParent() const { return DefaultResource::get(); }
 
 struct AutomaticAllocationScopeResource;
-extern template AutomaticAllocationScopeResource *Resource::Base<AutomaticAllocationScopeResource, DefaultResource>::get();
+extern template AutomaticAllocationScopeResource *
+Resource::Base<AutomaticAllocationScopeResource, DefaultResource>::get();
 /// An automatic allocation-scope resource that is valid in the context of a
 /// parent AutomaticAllocationScope trait.
 struct AutomaticAllocationScopeResource
@@ -450,14 +451,18 @@ struct Allocate;
 struct Free;
 struct Read;
 struct Write;
-}
+} // namespace MemoryEffects
 
-extern template MemoryEffects::Allocate *SideEffects::Effect::get<MemoryEffects::Allocate>();
-extern template MemoryEffects::Free *SideEffects::Effect::get<MemoryEffects::Free>();
-extern template MemoryEffects::Read *SideEffects::Effect::get<MemoryEffects::Read>();
-extern template MemoryEffects::Write *SideEffects::Effect::get<MemoryEffects::Write>();
+extern template MemoryEffects::Allocate *
+SideEffects::Effect::get<MemoryEffects::Allocate>();
+extern template MemoryEffects::Free *
+SideEffects::Effect::get<MemoryEffects::Free>();
+extern template MemoryEffects::Read *
+SideEffects::Effect::get<MemoryEffects::Read>();
+extern template MemoryEffects::Write *
+SideEffects::Effect::get<MemoryEffects::Write>();
 
-namespace MemoryEffects{
+namespace MemoryEffects {
 /// This class represents the base class used for memory effects.
 struct Effect : public SideEffects::Effect {
   using SideEffects::Effect::Effect;
diff --git a/mlir/lib/Interfaces/SideEffectInterfaces.cpp b/mlir/lib/Interfaces/SideEffectInterfaces.cpp
index c798fe66a..f02e7ab2b 100644
--- a/mlir/lib/Interfaces/SideEffectInterfaces.cpp
+++ b/mlir/lib/Interfaces/SideEffectInterfaces.cpp
@@ -20,12 +20,16 @@ using namespace mlir;
 /// Include the definitions of the side effect interfaces.
 #include "mlir/Interfaces/SideEffectInterfaces.cpp.inc"
 
-template MemoryEffects::Allocate *SideEffects::Effect::get<MemoryEffects::Allocate>();
+template MemoryEffects::Allocate *
+SideEffects::Effect::get<MemoryEffects::Allocate>();
 template MemoryEffects::Free *SideEffects::Effect::get<MemoryEffects::Free>();
 template MemoryEffects::Read *SideEffects::Effect::get<MemoryEffects::Read>();
 template MemoryEffects::Write *SideEffects::Effect::get<MemoryEffects::Write>();
-template SideEffects::DefaultResource *SideEffects::Resource::Base<SideEffects::DefaultResource>::get();
-template SideEffects::AutomaticAllocationScopeResource *SideEffects::Resource::Base<SideEffects::AutomaticAllocationScopeResource, SideEffects::DefaultResource>::get();
+template SideEffects::DefaultResource *
+SideEffects::Resource::Base<SideEffects::DefaultResource>::get();
+template SideEffects::AutomaticAllocationScopeResource *
+SideEffects::Resource::Base<SideEffects::AutomaticAllocationScopeResource,
+                            SideEffects::DefaultResource>::get();
 
 //===----------------------------------------------------------------------===//
 // MemoryEffects

``````````

</details>


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


More information about the Mlir-commits mailing list