Skip to content

Commit 1ee2eb2

Browse files
committed
Rename eltType to elementType
1 parent a1e84f3 commit 1ee2eb2

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
@@ -84,7 +84,7 @@ class CIRGenBuilderTy : public cir::CIRBaseBuilderTy {
8484
return true;
8585

8686
if (mlir::isa<cir::VectorType>(ty))
87-
return isSized(mlir::cast<cir::VectorType>(ty).getEltType());
87+
return isSized(mlir::cast<cir::VectorType>(ty).getElementType());
8888

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

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

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -674,8 +674,8 @@ ArrayType::getABIAlignment(const ::mlir::DataLayout &dataLayout,
674674
llvm::TypeSize cir::VectorType::getTypeSizeInBits(
675675
const ::mlir::DataLayout &dataLayout,
676676
::mlir::DataLayoutEntryListRef params) const {
677-
return llvm::TypeSize::getFixed(getSize() *
678-
dataLayout.getTypeSizeInBits(getEltType()));
677+
return llvm::TypeSize::getFixed(
678+
getSize() * dataLayout.getTypeSizeInBits(getElementType()));
679679
}
680680

681681
uint64_t
@@ -686,16 +686,17 @@ cir::VectorType::getABIAlignment(const ::mlir::DataLayout &dataLayout,
686686

687687
mlir::LogicalResult cir::VectorType::verify(
688688
llvm::function_ref<mlir::InFlightDiagnostic()> emitError,
689-
mlir::Type eltType, uint64_t size) {
689+
mlir::Type elementType, uint64_t size) {
690690
if (size == 0)
691691
return emitError() << "the number of vector elements must be non-zero";
692692

693693
// Check if it a valid FixedVectorType
694-
if (mlir::isa<cir::PointerType, cir::FP128Type>(eltType))
694+
if (mlir::isa<cir::PointerType, cir::FP128Type>(elementType))
695695
return success();
696696

697697
// Check if it a valid VectorType
698-
if (mlir::isa<cir::IntType>(eltType) || isAnyFloatingPointType(eltType))
698+
if (mlir::isa<cir::IntType>(elementType) ||
699+
isAnyFloatingPointType(elementType))
699700
return success();
700701

701702
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
@@ -1394,7 +1394,7 @@ static void prepareTypeConverter(mlir::LLVMTypeConverter &converter,
13941394
return mlir::LLVM::LLVMArrayType::get(ty, type.getSize());
13951395
});
13961396
converter.addConversion([&](cir::VectorType type) -> mlir::Type {
1397-
const mlir::Type ty = converter.convertType(type.getEltType());
1397+
const mlir::Type ty = converter.convertType(type.getElementType());
13981398
return mlir::VectorType::get(type.getSize(), ty);
13991399
});
14001400
converter.addConversion([&](cir::BoolType type) -> mlir::Type {

0 commit comments

Comments
 (0)