diff --git a/mlir/include/mlir/Dialect/Quant/UniformSupport.h b/mlir/include/mlir/Dialect/Quant/UniformSupport.h --- a/mlir/include/mlir/Dialect/Quant/UniformSupport.h +++ b/mlir/include/mlir/Dialect/Quant/UniformSupport.h @@ -31,7 +31,7 @@ /// process. struct ExpressedToQuantizedConverter { /// Creates a converter for the given input type. - static const ExpressedToQuantizedConverter forInputType(Type inputType); + static ExpressedToQuantizedConverter forInputType(Type inputType); /// Converts the inputType to be based on the given elemental type, /// returning the new type (or nullptr and emit an error on failure). diff --git a/mlir/lib/Dialect/Quant/Utils/UniformSupport.cpp b/mlir/lib/Dialect/Quant/Utils/UniformSupport.cpp --- a/mlir/lib/Dialect/Quant/Utils/UniformSupport.cpp +++ b/mlir/lib/Dialect/Quant/Utils/UniformSupport.cpp @@ -17,7 +17,7 @@ return inputType.isa(); } -const ExpressedToQuantizedConverter +ExpressedToQuantizedConverter ExpressedToQuantizedConverter::forInputType(Type inputType) { if (inputType.isa()) { Type elementType = inputType.cast().getElementType();