Skip to content

Commit f6cb7b2

Browse files
committed
fix *MemberOp
1 parent 765ab6e commit f6cb7b2

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2920,7 +2920,7 @@ def ExtractMemberOp : CIR_Op<"extract_member", [Pure]> {
29202920
```
29212921
}];
29222922

2923-
let arguments = (ins CIR_StructType:$record, IndexAttr:$index_attr);
2923+
let arguments = (ins Struct:$record, IndexAttr:$index_attr);
29242924
let results = (outs CIR_AnyType:$result);
29252925

29262926
let assemblyFormat = [{
@@ -2984,9 +2984,9 @@ def InsertMemberOp : CIR_Op<"insert_member",
29842984
```
29852985
}];
29862986

2987-
let arguments = (ins CIR_StructType:$record, IndexAttr:$index_attr,
2987+
let arguments = (ins Struct:$record, IndexAttr:$index_attr,
29882988
CIR_AnyType:$value);
2989-
let results = (outs CIR_StructType:$result);
2989+
let results = (outs Struct:$result);
29902990

29912991
let builders = [
29922992
OpBuilder<(ins "mlir::Value":$record, "uint64_t":$index,

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -757,6 +757,8 @@ def CIR_StructType : CIR_Type<"Struct", "struct",
757757
let hasCustomAssemblyFormat = 1;
758758
}
759759

760+
def Struct : Type<CPred<"::mlir::isa<::cir::StructType>($_self)">, "CIR struct type">;
761+
760762
//===----------------------------------------------------------------------===//
761763
// Global type constraints
762764
//===----------------------------------------------------------------------===//

0 commit comments

Comments
 (0)