[Mlir-commits] [mlir] 3f127d8 - Use `= default` for the ValueShapeRange copy-constructor (NFC)

Mehdi Amini llvmlistbot at llvm.org
Sun Jan 2 15:47:21 PST 2022


Author: Mehdi Amini
Date: 2022-01-02T23:43:52Z
New Revision: 3f127d8aaaef2ad4fc461c13bab2ec1482ea34f0

URL: https://github.com/llvm/llvm-project/commit/3f127d8aaaef2ad4fc461c13bab2ec1482ea34f0
DIFF: https://github.com/llvm/llvm-project/commit/3f127d8aaaef2ad4fc461c13bab2ec1482ea34f0.diff

LOG: Use `= default` for the ValueShapeRange copy-constructor (NFC)

This makes it trivially copyable.

Added: 
    

Modified: 
    mlir/include/mlir/Interfaces/InferTypeOpInterface.h

Removed: 
    


################################################################################
diff  --git a/mlir/include/mlir/Interfaces/InferTypeOpInterface.h b/mlir/include/mlir/Interfaces/InferTypeOpInterface.h
index c4f8f2d905e56..3ed9dcc9d3dd7 100644
--- a/mlir/include/mlir/Interfaces/InferTypeOpInterface.h
+++ b/mlir/include/mlir/Interfaces/InferTypeOpInterface.h
@@ -165,10 +165,7 @@ class ValueShapeRange : public ValueRange::RangeBaseT {
   ValueShapeRange(const std::initializer_list<Value> &values)
       : ValueShapeRange(ValueRange(values)) {}
 
-  ValueShapeRange(const ValueShapeRange &other) : RangeBaseT(other) {
-    operandShape = other.operandShape;
-    valueToShape = other.valueToShape;
-  }
+  ValueShapeRange(const ValueShapeRange &) = default;
 
   /// Sets the Value to ShapeAdaptor mapping function and returns this.
   ValueShapeRange &setValueToShapeMapping(ValueShapeMapFn fn) {


        


More information about the Mlir-commits mailing list