Skip to content

Commit 25e2f3a

Browse files
committed
Address code review comments
1 parent 16c5a4f commit 25e2f3a

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -811,8 +811,10 @@ def CIR_TypeInfoAttr : CIR_Attr<"TypeInfo", "typeinfo", [TypedAttrInterface]> {
811811
```
812812
}];
813813

814-
let parameters = (ins AttributeSelfTypeParameter<"">:$type,
815-
CIR_IntOrGlobalViewArrayAttr:$data);
814+
let parameters = (ins
815+
AttributeSelfTypeParameter<"">:$type,
816+
CIR_IntOrGlobalViewArrayAttr:$data
817+
);
816818

817819
let builders = [
818820
AttrBuilderWithInferredContext<(ins "mlir::Type":$type,

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2745,9 +2745,9 @@ LogicalResult cir::AtomicCmpXchg::verify() {
27452745

27462746
LogicalResult cir::TypeInfoAttr::verify(
27472747
::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError,
2748-
::mlir::Type type, ::mlir::ArrayAttr typeinfoData) {
2748+
::mlir::Type type, ::mlir::ArrayAttr typeInfoData) {
27492749

2750-
if (cir::ConstRecordAttr::verify(emitError, type, typeinfoData).failed())
2750+
if (cir::ConstRecordAttr::verify(emitError, type, typeInfoData).failed())
27512751
return failure();
27522752

27532753
return success();

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -523,12 +523,12 @@ mlir::Value CIRAttrToValue::visitCirAttr(cir::GlobalViewAttr globalAttr) {
523523
}
524524

525525
// TypeInfoAttr visitor.
526-
mlir::Value CIRAttrToValue::visitCirAttr(cir::TypeInfoAttr typeinfoAttr) {
527-
mlir::Type llvmTy = converter->convertType(typeinfoAttr.getType());
526+
mlir::Value CIRAttrToValue::visitCirAttr(cir::TypeInfoAttr typeInfoAttr) {
527+
mlir::Type llvmTy = converter->convertType(typeInfoAttr.getType());
528528
mlir::Location loc = parentOp->getLoc();
529529
mlir::Value result = mlir::LLVM::UndefOp::create(rewriter, loc, llvmTy);
530530

531-
for (auto [idx, elt] : llvm::enumerate(typeinfoAttr.getData())) {
531+
for (auto [idx, elt] : llvm::enumerate(typeInfoAttr.getData())) {
532532
mlir::Value init = visit(elt);
533533
result =
534534
mlir::LLVM::InsertValueOp::create(rewriter, loc, result, init, idx);

0 commit comments

Comments
 (0)