We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 46ffacc commit 0179aa5Copy full SHA for 0179aa5
mlir/include/mlir/Dialect/EmitC/IR/EmitC.td
@@ -798,6 +798,19 @@ def EmitC_LiteralOp : EmitC_Op<"literal", [Pure]> {
798
let description = [{
799
The `emitc.literal` operation produces an SSA value equal to some constant
800
specified by an attribute.
801
+
802
+ Example:
803
804
+ ```mlir
805
+ %x = "emitc.variable"() <{value = #emitc.opaque<"">}> : () -> !emitc.lvalue<i32>
806
+ %one = literal "1" : i32
807
+ "emitc.assign"(%x, %one) : (!emitc.lvalue<i32>, i32) -> ()
808
+ ```
809
+ ```c++
810
+ // Code emitted for the operation above.
811
+ int32_t v1;
812
+ v1 = 1;
813
814
}];
815
816
let arguments = (ins StrAttr:$value);
0 commit comments