Skip to content

Commit 1187740

Browse files
authored
[CIR][NFC] Clean up constant op comments (llvm#162142)
1 parent a01550f commit 1187740

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -278,22 +278,22 @@ def CIR_PtrStrideOp : CIR_Op<"ptr_stride", [
278278
def CIR_ConstantOp : CIR_Op<"const", [
279279
ConstantLike, Pure, AllTypesMatch<["value", "res"]>
280280
]> {
281-
let summary = "Defines a CIR constant";
281+
let summary = "Create a CIR constant from a literal attribute";
282282
let description = [{
283283
The `cir.const` operation turns a literal into an SSA value. The data is
284284
attached to the operation as an attribute.
285285

286286
```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>
290290
```
291291
}];
292292

293293
let arguments = (ins TypedAttrInterface:$value);
294294
let results = (outs CIR_AnyType:$res);
295295

296-
let assemblyFormat = "attr-dict $value";
296+
let assemblyFormat = "$value attr-dict";
297297

298298
let hasVerifier = 1;
299299

0 commit comments

Comments
 (0)