[Mlir-commits] [mlir] [mlir] Remove redundant declarations (NFC) (PR #166896)
Kazu Hirata
llvmlistbot at llvm.org
Thu Nov 6 22:16:13 PST 2025
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/166896
In C++17, static constexpr members are implicitly inline, so they no
longer require an out-of-line definition.
The comments for these variables are also present in:
mlir/include/mlir/Dialect/Bufferization/IR/BufferizationBase.td
Identified with readability-redundant-declaration.
>From 522f4a28e1df877f218af92b297a8f3715045405 Mon Sep 17 00:00:00 2001
From: Kazu Hirata <kazu at google.com>
Date: Thu, 6 Nov 2025 13:42:03 -0800
Subject: [PATCH] [mlir] Remove redundant declarations (NFC)
In C++17, static constexpr members are implicitly inline, so they no
longer require an out-of-line definition.
The comments for these variables are also present in:
mlir/include/mlir/Dialect/Bufferization/IR/BufferizationBase.td
Identified with readability-redundant-declaration.
---
.../Bufferization/IR/BufferizationDialect.cpp | 19 -------------------
1 file changed, 19 deletions(-)
diff --git a/mlir/lib/Dialect/Bufferization/IR/BufferizationDialect.cpp b/mlir/lib/Dialect/Bufferization/IR/BufferizationDialect.cpp
index 6c08cdfb669f3..d6c3cd62ee742 100644
--- a/mlir/lib/Dialect/Bufferization/IR/BufferizationDialect.cpp
+++ b/mlir/lib/Dialect/Bufferization/IR/BufferizationDialect.cpp
@@ -21,25 +21,6 @@ using namespace mlir::bufferization;
#include "mlir/Dialect/Bufferization/IR/BufferizationOpsDialect.cpp.inc"
-/// Attribute name used to mark function arguments who's buffers can be written
-/// to during One-Shot Module Bufferize.
-constexpr const ::llvm::StringLiteral BufferizationDialect::kWritableAttrName;
-
-/// Attribute name used to mark the bufferization layout for region arguments
-/// during One-Shot Module Bufferize.
-constexpr const ::llvm::StringLiteral
- BufferizationDialect::kBufferLayoutAttrName;
-
-/// An attribute that can be attached to ops with an allocation and/or
-/// deallocation side effect. It indicates that the op is under a "manual
-/// deallocation" scheme. In the case of an allocation op, the returned
-/// value is *not* an automatically managed allocation and assigned an
-/// ownership of "false". Furthermore, only deallocation ops that are
-/// guaranteed to deallocate a buffer under "manual deallocation" are
-/// allowed to have this attribute. (Deallocation ops without this
-/// attribute are rejected by the ownership-based buffer deallocation pass.)
-constexpr const ::llvm::StringLiteral BufferizationDialect::kManualDeallocation;
-
//===----------------------------------------------------------------------===//
// Bufferization Dialect Interfaces
//===----------------------------------------------------------------------===//
More information about the Mlir-commits
mailing list