mirror of
https://github.com/RPCS3/llvm.git
synced 2025-01-18 16:03:17 +00:00
Add metadata example.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97764 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
e5790a432a
commit
e1d50cd5e4
@ -2520,6 +2520,23 @@ call void asm alignstack "eieio", ""()
|
||||
metadata nodes, which can be looked up in the module symbol table. For
|
||||
example: "<tt>!foo = metadata !{!4, !3}</tt>".
|
||||
|
||||
<p>Metadata can be used as function arguments. Here <tt>llvm.dbg.value</tt>
|
||||
function is using two metadata arguments.
|
||||
|
||||
<div class="doc_code">
|
||||
<pre>
|
||||
call void @llvm.dbg.value(metadata !24, i64 0, metadata !25)
|
||||
</pre>
|
||||
</div></p>
|
||||
|
||||
<p>Metadata can be attached with an instruction. Here metadata <tt>!21</tt> is
|
||||
attached with <tt>add</tt> instruction using <tt>!dbg</tt> identifier.
|
||||
|
||||
<div class="doc_code">
|
||||
<pre>
|
||||
%indvar.next = add i64 %indvar, 1, !dbg !21
|
||||
</pre>
|
||||
</div></p>
|
||||
</div>
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user