diff options
Diffstat (limited to 'mlir/g3doc/Dialects/LLVM.md')
-rw-r--r-- | mlir/g3doc/Dialects/LLVM.md | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/mlir/g3doc/Dialects/LLVM.md b/mlir/g3doc/Dialects/LLVM.md index 566e506828b..20afa32b4ab 100644 --- a/mlir/g3doc/Dialects/LLVM.md +++ b/mlir/g3doc/Dialects/LLVM.md @@ -302,6 +302,13 @@ llvm.global constant @cst(42 : i32) : !llvm.i32 // Non-constant values must also be initialized. llvm.global @variable(32.0 : f32) : !llvm.float + +// Strings are expected to be of wrapped LLVM i8 array type and do not +// automatically include the trailing zero. +llvm.global @string("abc") : !llvm<"[3 x i8]"> + +// For strings globals, the trailing type may be omitted. +llvm.global constant @no_trailing_type("foo bar") ``` #### `llvm.undef` |