File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
mlir/include/mlir/Dialect/EmitC/IR Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -1172,8 +1172,8 @@ def EmitC_GlobalOp : EmitC_Op<"global", [Symbol]> {
1172
1172
let summary = "A global variable";
1173
1173
let description = [{
1174
1174
The `emitc.global` operation declares or defines a named global variable.
1175
- The backing memory for the variable is allocated statically and is
1176
- described by the type of the variable .
1175
+ The backing memory for the variable is allocated statically and described by
1176
+ the variable's type, which must be an EmitC type .
1177
1177
Optionally, an `initial_value` can be provided.
1178
1178
Internal linkage can be specified using the `static_specifier` unit attribute
1179
1179
and external linkage can be specified using the `extern_specifier` unit attribute.
@@ -1193,6 +1193,8 @@ def EmitC_GlobalOp : EmitC_Op<"global", [Symbol]> {
1193
1193
emitc.global @x : !emitc.array<2xf32> = dense<0.0>
1194
1194
// Global variable with an initial values.
1195
1195
emitc.global @x : !emitc.array<3xi32> = dense<[0, 1, 2]>
1196
+ // Global variable with an opaque initial value.
1197
+ emitc.global @x : !emitc.opaque<"char"> = #emitc.opaque<"CHAR_MIN">
1196
1198
// External global variable
1197
1199
emitc.global extern @x : !emitc.array<2xf32>
1198
1200
// Constant global variable with internal linkage
You can’t perform that action at this time.
0 commit comments