Skip to content

Commit f6338bb

Browse files
[CIR][NFC] Add example for get_bitfield with volatile qualifier
1 parent 68309ad commit f6338bb

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1685,6 +1685,9 @@ def GetBitfieldOp : CIR_Op<"get_bitfield"> {
16851685

16861686
A unit attribute `volatile` can be used to indicate a volatile load of the
16871687
bitfield.
1688+
```mlir
1689+
cir.get_bitfield(#bfi, %0 {is_volatile} : !cir.ptr<!u64i>) -> !s32i
1690+
```
16881691

16891692
Example:
16901693
Suppose we have a struct with multiple bitfields stored in

0 commit comments

Comments
 (0)