Skip to content

Commit 6f96418

Browse files
committed
Rename vtable_data to data
1 parent 1736a32 commit 6f96418

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -542,23 +542,23 @@ def CIR_VTableAttr : CIR_Attr<"VTable", "vtable", [TypedAttrInterface]> {
542542
```
543543
}];
544544

545-
// `vtable_data` is a const record with one element, containing an array of
545+
// `data` is a const record with one element, containing an array of
546546
// vtable information.
547547
let parameters = (ins
548548
AttributeSelfTypeParameter<"">:$type,
549-
"mlir::ArrayAttr":$vtable_data
549+
"mlir::ArrayAttr":$data
550550
);
551551

552552
let builders = [
553553
AttrBuilderWithInferredContext<(ins "mlir::Type":$type,
554-
"mlir::ArrayAttr":$vtable_data), [{
555-
return $_get(type.getContext(), type, vtable_data);
554+
"mlir::ArrayAttr":$data), [{
555+
return $_get(type.getContext(), type, data);
556556
}]>
557557
];
558558

559559
let genVerifyDecl = 1;
560560
let assemblyFormat = [{
561-
`<` custom<RecordMembers>($vtable_data) `>`
561+
`<` custom<RecordMembers>($data) `>`
562562
}];
563563
}
564564

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -430,18 +430,18 @@ cir::ConstVectorAttr::verify(function_ref<InFlightDiagnostic()> emitError,
430430

431431
LogicalResult cir::VTableAttr::verify(
432432
llvm::function_ref<mlir::InFlightDiagnostic()> emitError, mlir::Type type,
433-
mlir::ArrayAttr vtableData) {
433+
mlir::ArrayAttr data) {
434434
auto sTy = mlir::dyn_cast_if_present<cir::RecordType>(type);
435435
if (!sTy)
436436
return emitError() << "expected !cir.record type result";
437-
if (sTy.getMembers().empty() || vtableData.empty())
437+
if (sTy.getMembers().empty() || data.empty())
438438
return emitError() << "expected record type with one or more subtype";
439439

440-
if (cir::ConstRecordAttr::verify(emitError, type, vtableData).failed())
440+
if (cir::ConstRecordAttr::verify(emitError, type, data).failed())
441441
return failure();
442442

443-
for (const auto &data : vtableData.getAsRange<mlir::Attribute>()) {
444-
const auto &constArrayAttr = mlir::dyn_cast<cir::ConstArrayAttr>(data);
443+
for (const auto &element : data.getAsRange<mlir::Attribute>()) {
444+
const auto &constArrayAttr = mlir::dyn_cast<cir::ConstArrayAttr>(element);
445445
if (!constArrayAttr)
446446
return emitError() << "expected constant array subtype";
447447

0 commit comments

Comments
 (0)