Skip to content

Commit cdfd290

Browse files
[mlir] Remove redundant declarations (NFC) (llvm#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.
1 parent eb63a4a commit cdfd290

File tree

6 files changed

+0
-16
lines changed

6 files changed

+0
-16
lines changed

mlir/lib/Dialect/Async/IR/Async.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@ using namespace mlir::async;
1717

1818
#include "mlir/Dialect/Async/IR/AsyncOpsDialect.cpp.inc"
1919

20-
constexpr StringRef AsyncDialect::kAllowedToBlockAttrName;
21-
2220
void AsyncDialect::initialize() {
2321
addOperations<
2422
#define GET_OP_LIST

mlir/lib/Dialect/DLTI/DLTI.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -606,11 +606,6 @@ FailureOr<Attribute> dlti::query(Operation *op, ArrayRef<StringRef> keys,
606606
return dlti::query(op, entryKeys, emitError);
607607
}
608608

609-
constexpr const StringLiteral mlir::DLTIDialect::kDataLayoutAttrName;
610-
constexpr const StringLiteral mlir::DLTIDialect::kDataLayoutEndiannessKey;
611-
constexpr const StringLiteral mlir::DLTIDialect::kDataLayoutEndiannessBig;
612-
constexpr const StringLiteral mlir::DLTIDialect::kDataLayoutEndiannessLittle;
613-
614609
namespace {
615610
class TargetDataLayoutInterface : public DataLayoutDialectInterface {
616611
public:

mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -640,8 +640,6 @@ SuccessorOperands SwitchOp::getSuccessorOperands(unsigned index) {
640640
// Code for LLVM::GEPOp.
641641
//===----------------------------------------------------------------------===//
642642

643-
constexpr int32_t GEPOp::kDynamicIndex;
644-
645643
GEPIndicesAdaptor<ValueRange> GEPOp::getIndices() {
646644
return GEPIndicesAdaptor<ValueRange>(getRawConstantIndicesAttr(),
647645
getDynamicIndices());

mlir/lib/Dialect/Transform/Interfaces/TransformInterfaces.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,6 @@ static bool happensBefore(Operation *a, Operation *b) {
4747
// TransformState
4848
//===----------------------------------------------------------------------===//
4949

50-
constexpr const Value transform::TransformState::kTopLevelValue;
51-
5250
transform::TransformState::TransformState(
5351
Region *region, Operation *payloadRoot,
5452
const RaggedArray<MappedValue> &extraMappings,

mlir/lib/IR/BuiltinTypeInterfaces.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,6 @@ unsigned FloatType::getFPMantissaWidth() {
3434
// ShapedType
3535
//===----------------------------------------------------------------------===//
3636

37-
constexpr int64_t ShapedType::kDynamic;
38-
3937
int64_t ShapedType::getNumElements(ArrayRef<int64_t> shape) {
4038
int64_t num = 1;
4139
for (int64_t dim : shape) {

mlir/lib/IR/Operation.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -375,9 +375,6 @@ llvm::hash_code Operation::hashProperties() {
375375
// Operation Ordering
376376
//===----------------------------------------------------------------------===//
377377

378-
constexpr unsigned Operation::kInvalidOrderIdx;
379-
constexpr unsigned Operation::kOrderStride;
380-
381378
/// Given an operation 'other' that is within the same parent block, return
382379
/// whether the current operation is before 'other' in the operation list
383380
/// of the parent block.

0 commit comments

Comments
 (0)