[mlir] Remove redundant declarations (NFC) (#166714)

In C++17, static constexpr members are implicitly inline, so they no
longer require an out-of-line definition.

Identified with readability-redundant-declaration.
This commit is contained in:
Kazu Hirata 2025-11-06 06:52:06 -08:00 committed by GitHub
parent eb63a4aa9e
commit cdfd2905fd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 0 additions and 16 deletions

View File

@ -17,8 +17,6 @@ using namespace mlir::async;
#include "mlir/Dialect/Async/IR/AsyncOpsDialect.cpp.inc"
constexpr StringRef AsyncDialect::kAllowedToBlockAttrName;
void AsyncDialect::initialize() {
addOperations<
#define GET_OP_LIST

View File

@ -606,11 +606,6 @@ FailureOr<Attribute> dlti::query(Operation *op, ArrayRef<StringRef> keys,
return dlti::query(op, entryKeys, emitError);
}
constexpr const StringLiteral mlir::DLTIDialect::kDataLayoutAttrName;
constexpr const StringLiteral mlir::DLTIDialect::kDataLayoutEndiannessKey;
constexpr const StringLiteral mlir::DLTIDialect::kDataLayoutEndiannessBig;
constexpr const StringLiteral mlir::DLTIDialect::kDataLayoutEndiannessLittle;
namespace {
class TargetDataLayoutInterface : public DataLayoutDialectInterface {
public:

View File

@ -640,8 +640,6 @@ SuccessorOperands SwitchOp::getSuccessorOperands(unsigned index) {
// Code for LLVM::GEPOp.
//===----------------------------------------------------------------------===//
constexpr int32_t GEPOp::kDynamicIndex;
GEPIndicesAdaptor<ValueRange> GEPOp::getIndices() {
return GEPIndicesAdaptor<ValueRange>(getRawConstantIndicesAttr(),
getDynamicIndices());

View File

@ -47,8 +47,6 @@ static bool happensBefore(Operation *a, Operation *b) {
// TransformState
//===----------------------------------------------------------------------===//
constexpr const Value transform::TransformState::kTopLevelValue;
transform::TransformState::TransformState(
Region *region, Operation *payloadRoot,
const RaggedArray<MappedValue> &extraMappings,

View File

@ -34,8 +34,6 @@ unsigned FloatType::getFPMantissaWidth() {
// ShapedType
//===----------------------------------------------------------------------===//
constexpr int64_t ShapedType::kDynamic;
int64_t ShapedType::getNumElements(ArrayRef<int64_t> shape) {
int64_t num = 1;
for (int64_t dim : shape) {

View File

@ -375,9 +375,6 @@ llvm::hash_code Operation::hashProperties() {
// Operation Ordering
//===----------------------------------------------------------------------===//
constexpr unsigned Operation::kInvalidOrderIdx;
constexpr unsigned Operation::kOrderStride;
/// Given an operation 'other' that is within the same parent block, return
/// whether the current operation is before 'other' in the operation list
/// of the parent block.