llvm.org GIT mirror llvm / 3389dbc
[docs] Get rid of some UTF8 characters (non-breaking space maybe). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172741 91177308-0d34-0410-b5e6-96231b3b80d8 Daniel Dunbar 7 years ago
1 changed file(s) with 17 addition(s) and 17 deletion(s). Raw diff Collapse all Expand all
147147
148148 .. code-block:: llvm
149149
150 ; Declare the string constant as a global constant. 
151 @.str = private unnamed_addr constant [13 x i8] c"hello world\0A\00" 
152
153 ; External declaration of the puts function 
154 declare i32 @puts(i8* nocapture) nounwind 
150 ; Declare the string constant as a global constant.
151 @.str = private unnamed_addr constant [13 x i8] c"hello world\0A\00"
152
153 ; External declaration of the puts function
154 declare i32 @puts(i8* nocapture) nounwind
155155
156156 ; Definition of main function
157 define i32 @main() { ; i32()*  
158 ; Convert [13 x i8]* to i8 *... 
157 define i32 @main() { ; i32()*
158 ; Convert [13 x i8]* to i8 *...
159159 %cast210 = getelementptr [13 x i8]* @.str, i64 0, i64 0
160160
161 ; Call puts function to write out the string to stdout. 
161 ; Call puts function to write out the string to stdout.
162162 call i32 @puts(i8* %cast210)
163 ret i32 0 
163 ret i32 0
164164 }
165165
166166 ; Named metadata
15531553 +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+
15541554 | ``i32 (i32)`` | function taking an ``i32``, returning an ``i32`` |
15551555 +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1556 | ``float (i16, i32 *) *`` | :ref:`Pointer ` to a function that takes an ``i16`` and a :ref:`pointer ` to ``i32``, returning ``float``. |
1556 | ``float (i16, i32 *) *`` | :ref:`Pointer ` to a function that takes an ``i16`` and a :ref:`pointer ` to ``i32``, returning ``float``. |
15571557 +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+
15581558 | ``i32 (i8*, ...)`` | A vararg function that takes at least one :ref:`pointer ` to ``i8`` (char in C), which returns an integer. This is the signature for ``printf`` in LLVM. |
15591559 +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+
16041604 +------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
16051605 | ``{ i32, i32, i32 }`` | A triple of three ``i32`` values |
16061606 +------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1607 | ``{ float, i32 (i32) * }`` | A pair, where the first element is a ``float`` and the second element is a :ref:`pointer ` to a :ref:`function ` that takes an ``i32``, returning an ``i32``. |
1607 | ``{ float, i32 (i32) * }`` | A pair, where the first element is a ``float`` and the second element is a :ref:`pointer ` to a :ref:`function ` that takes an ``i32``, returning an ``i32``. |
16081608 +------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
16091609 | ``<{ i8, i32 }>`` | A packed struct known to be 5 bytes in size. |
16101610 +------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
25772577 * - Key
25782578 - Value
25792579
2580 * - ``Objective-C Version``
2580 * - ``Objective-C Version``
25812581 - **[Required]** — The Objective-C ABI version. Valid values are 1 and 2.
25822582
2583 * - ``Objective-C Image Info Version``
2583 * - ``Objective-C Image Info Version``
25842584 - **[Required]** — The version of the image info section. Currently
25852585 always 0.
25862586
2587 * - ``Objective-C Image Info Section``
2587 * - ``Objective-C Image Info Section``
25882588 - **[Required]** — The section to place the metadata. Valid values are
25892589 ``"__OBJC, __image_info, regular"`` for Objective-C ABI version 1, and
25902590 ``"__DATA,__objc_imageinfo, regular, no_dead_strip"`` for
25912591 Objective-C ABI version 2.
25922592
2593 * - ``Objective-C Garbage Collection``
2593 * - ``Objective-C Garbage Collection``
25942594 - **[Required]** — Specifies whether garbage collection is supported or
25952595 not. Valid values are 0, for no garbage collection, and 2, for garbage
25962596 collection supported.
25972597
2598 * - ``Objective-C GC Only``
2598 * - ``Objective-C GC Only``
25992599 - **[Optional]** — Specifies that only garbage collection is supported.
26002600 If present, its value must be 6. This flag requires that the
26012601 ``Objective-C Garbage Collection`` flag have the value 2.
26182618 these automatically be transmitted to the linker via object files.
26192619
26202620 These flags are encoded in the IR using metadata in the module flags section,
2621 using the ``Linker Options`` key. The merge behavior for this flag is required
2621 using the ``Linker Options`` key. The merge behavior for this flag is required
26222622 to be ``AppendUnique``, and the value for the key is expected to be a metadata
26232623 node which should be a list of other metadata nodes, each of which should be a
26242624 list of metadata strings defining linker options.