aboutsummaryrefslogtreecommitdiffstats
path: root/docs/LangRef.html
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2010-03-04 23:44:48 +0000
committerDevang Patel <dpatel@apple.com>2010-03-04 23:44:48 +0000
commite1d50cd5e4ff7f4d977cc8bda720a58737e7cf8d (patch)
tree4245e9589a0f05287ed88128670918c932bffcf9 /docs/LangRef.html
parente5790a432a320c64440bf62adbcec378046eef6b (diff)
downloadexternal_llvm-e1d50cd5e4ff7f4d977cc8bda720a58737e7cf8d.zip
external_llvm-e1d50cd5e4ff7f4d977cc8bda720a58737e7cf8d.tar.gz
external_llvm-e1d50cd5e4ff7f4d977cc8bda720a58737e7cf8d.tar.bz2
Add metadata example.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97764 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'docs/LangRef.html')
-rw-r--r--docs/LangRef.html17
1 files changed, 17 insertions, 0 deletions
diff --git a/docs/LangRef.html b/docs/LangRef.html
index 20c64bd..7cfa052 100644
--- a/docs/LangRef.html
+++ b/docs/LangRef.html
@@ -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>