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:
Devang Patel 2010-03-04 23:44:48 +00:00
parent e5790a432a
commit e1d50cd5e4

View File

@ -2520,6 +2520,23 @@ call void asm alignstack "eieio", ""()
metadata nodes, which can be looked up in the module symbol table. For metadata nodes, which can be looked up in the module symbol table. For
example: "<tt>!foo = metadata !{!4, !3}</tt>". 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> </div>