mirror of
https://github.com/intel/llvm.git
synced 2026-02-02 10:08:59 +08:00
[mlir] Fix -Wdeprecated-copy in SparseTensorType.h (NFC)
/data/jiefu/llvm-project/mlir/include/mlir/Dialect/SparseTensor/IR/SparseTensorType.h:63:21: error: definition of implicit copy constructor for 'SparseTensorType' is deprecated because it has a user-declared copy assignment operator [-Werror,-Wdeprecated-copy]
SparseTensorType &operator=(const SparseTensorType &) = delete;
^
/data/jiefu/llvm-project/mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorStorageLayout.h:239:9: note: in implicit copy constructor for 'mlir::sparse_tensor::SparseTensorType' first required here
: rType(stt), fields(fields) {
^
1 error generated.
This commit is contained in:
@@ -61,6 +61,7 @@ public:
|
||||
// Copy-assignment would be implicitly deleted (because our fields
|
||||
// are const), so we explicitly delete it for clarity.
|
||||
SparseTensorType &operator=(const SparseTensorType &) = delete;
|
||||
SparseTensorType(const SparseTensorType &) = default;
|
||||
|
||||
/// Constructs a new `SparseTensorType` with the same dimension-shape
|
||||
/// and element type, but with the encoding replaced by the given encoding.
|
||||
|
||||
Reference in New Issue
Block a user