Skip to content

Commit 29128f2

Browse files
committed
[MLIR] Apply clang-tidy fixes for readability-identifier-naming in ConversionUtils.cpp (NFC)
1 parent 492f463 commit 29128f2

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

mlir/lib/Dialect/Tosa/Utils/ConversionUtils.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -162,8 +162,8 @@ Value mlir::tosa::getTosaConstShape(ImplicitLocOpBuilder &builder,
162162
llvm::ArrayRef<int64_t> shape) {
163163
auto attr = builder.getIndexTensorAttr(convertFromMlirShape(shape));
164164
auto type = mlir::tosa::shapeType::get(builder.getContext(), shape.size());
165-
mlir::Operation *mlir_op = tosa::ConstShapeOp::create(builder, type, attr);
166-
return mlir_op->getResult(0);
165+
mlir::Operation *mlirOp = tosa::ConstShapeOp::create(builder, type, attr);
166+
return mlirOp->getResult(0);
167167
}
168168

169169
Value mlir::tosa::getTosaConstShape(PatternRewriter &rewriter, Location loc,
@@ -179,7 +179,7 @@ SmallVector<int64_t> mlir::tosa::convertFromMlirShape(ArrayRef<int64_t> shape) {
179179
}
180180

181181
bool mlir::tosa::getConstShapeValues(Operation *op,
182-
llvm::SmallVector<int64_t> &result_shape) {
182+
llvm::SmallVector<int64_t> &resultShape) {
183183
if (!op) {
184184
return false;
185185
}
@@ -188,7 +188,7 @@ bool mlir::tosa::getConstShapeValues(Operation *op,
188188
DenseElementsAttr elementsAttr = cast<DenseElementsAttr>(constOpAttr);
189189
for (int i = 0; i < elementsAttr.size(); i++) {
190190
int64_t val = elementsAttr.getValues<int64_t>()[i];
191-
result_shape.push_back(val);
191+
resultShape.push_back(val);
192192
}
193193
return true;
194194
}
@@ -204,9 +204,9 @@ mlir::tosa::convertFromIntAttr(const DenseElementsAttr &attr, const int rank) {
204204
return SmallVector<int64_t>(rank, v);
205205
}
206206

207-
if (auto int_array_attr = llvm::dyn_cast<DenseIntElementsAttr>(attr)) {
207+
if (auto intArrayAttr = llvm::dyn_cast<DenseIntElementsAttr>(attr)) {
208208
SmallVector<int64_t> vec;
209-
for (APInt val : int_array_attr.getValues<APInt>()) {
209+
for (APInt val : intArrayAttr.getValues<APInt>()) {
210210
vec.push_back(val.getSExtValue());
211211
}
212212
return vec;

0 commit comments

Comments
 (0)