Skip to content

Commit 1f11895

Browse files
committed
Rename eltType to elementType
1 parent 515376b commit 1f11895

File tree

4 files changed

+12
-11
lines changed

4 files changed

+12
-11
lines changed

clang/include/clang/CIR/Dialect/IR/CIRTypes.td

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -327,17 +327,17 @@ def CIR_VectorType : CIR_Type<"Vector", "vector",
327327
```
328328
}];
329329

330-
let parameters = (ins "mlir::Type":$eltType, "uint64_t":$size);
330+
let parameters = (ins "mlir::Type":$elementType, "uint64_t":$size);
331331

332332
let assemblyFormat = [{
333-
`<` $size `x` $eltType `>`
333+
`<` $size `x` $elementType `>`
334334
}];
335335

336336
let builders = [
337337
TypeBuilderWithInferredContext<(ins
338-
"mlir::Type":$eltType, "uint64_t":$size
338+
"mlir::Type":$elementType, "uint64_t":$size
339339
), [{
340-
return $_get(eltType.getContext(), eltType, size);
340+
return $_get(elementType.getContext(), elementType, size);
341341
}]>,
342342
];
343343

clang/lib/CIR/CodeGen/CIRGenBuilder.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ class CIRGenBuilderTy : public cir::CIRBaseBuilderTy {
8383
return true;
8484

8585
if (mlir::isa<cir::VectorType>(ty))
86-
return isSized(mlir::cast<cir::VectorType>(ty).getEltType());
86+
return isSized(mlir::cast<cir::VectorType>(ty).getElementType());
8787

8888
assert(!cir::MissingFeatures::unsizedTypes());
8989
return false;

clang/lib/CIR/Dialect/IR/CIRTypes.cpp

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -644,8 +644,8 @@ ArrayType::getABIAlignment(const ::mlir::DataLayout &dataLayout,
644644
llvm::TypeSize cir::VectorType::getTypeSizeInBits(
645645
const ::mlir::DataLayout &dataLayout,
646646
::mlir::DataLayoutEntryListRef params) const {
647-
return llvm::TypeSize::getFixed(getSize() *
648-
dataLayout.getTypeSizeInBits(getEltType()));
647+
return llvm::TypeSize::getFixed(
648+
getSize() * dataLayout.getTypeSizeInBits(getElementType()));
649649
}
650650

651651
uint64_t
@@ -656,16 +656,17 @@ cir::VectorType::getABIAlignment(const ::mlir::DataLayout &dataLayout,
656656

657657
mlir::LogicalResult cir::VectorType::verify(
658658
llvm::function_ref<mlir::InFlightDiagnostic()> emitError,
659-
mlir::Type eltType, uint64_t size) {
659+
mlir::Type elementType, uint64_t size) {
660660
if (size == 0)
661661
return emitError() << "the number of vector elements must be non-zero";
662662

663663
// Check if it a valid FixedVectorType
664-
if (mlir::isa<cir::PointerType, cir::FP128Type>(eltType))
664+
if (mlir::isa<cir::PointerType, cir::FP128Type>(elementType))
665665
return success();
666666

667667
// Check if it a valid VectorType
668-
if (mlir::isa<cir::IntType>(eltType) || isAnyFloatingPointType(eltType))
668+
if (mlir::isa<cir::IntType>(elementType) ||
669+
isAnyFloatingPointType(elementType))
669670
return success();
670671

671672
return emitError() << "expected LLVM-compatible fixed-vector type "

clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVM.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1310,7 +1310,7 @@ static void prepareTypeConverter(mlir::LLVMTypeConverter &converter,
13101310
return mlir::LLVM::LLVMArrayType::get(ty, type.getSize());
13111311
});
13121312
converter.addConversion([&](cir::VectorType type) -> mlir::Type {
1313-
const mlir::Type ty = converter.convertType(type.getEltType());
1313+
const mlir::Type ty = converter.convertType(type.getElementType());
13141314
return mlir::VectorType::get(type.getSize(), ty);
13151315
});
13161316
converter.addConversion([&](cir::BoolType type) -> mlir::Type {

0 commit comments

Comments
 (0)