File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
clang/include/clang/CIR/Dialect/IR Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -278,22 +278,22 @@ def CIR_PtrStrideOp : CIR_Op<"ptr_stride", [
278
278
def CIR_ConstantOp : CIR_Op<"const", [
279
279
ConstantLike, Pure, AllTypesMatch<["value", "res"]>
280
280
]> {
281
- let summary = "Defines a CIR constant";
281
+ let summary = "Create a CIR constant from a literal attribute ";
282
282
let description = [{
283
283
The `cir.const` operation turns a literal into an SSA value. The data is
284
284
attached to the operation as an attribute.
285
285
286
286
```mlir
287
- %0 = cir.const 42 : i32
288
- %1 = cir.const 4.2 : f32
289
- %2 = cir.const nullptr : !cir.ptr<i32 >
287
+ %0 = cir.const #cir.int<4> : !u32i
288
+ %1 = cir.const #cir.fp<1.500000e+00> : !cir.float
289
+ %2 = cir.const #cir.ptr<null> : !cir.ptr<!void >
290
290
```
291
291
}];
292
292
293
293
let arguments = (ins TypedAttrInterface:$value);
294
294
let results = (outs CIR_AnyType:$res);
295
295
296
- let assemblyFormat = "attr-dict $value ";
296
+ let assemblyFormat = "$value attr-dict";
297
297
298
298
let hasVerifier = 1;
299
299
You can’t perform that action at this time.
0 commit comments