[llvm-commits] [llvm] r97764 - /llvm/trunk/docs/LangRef.html

Devang Patel dpatel at apple.com
Thu Mar 4 15:44:49 PST 2010


Author: dpatel
Date: Thu Mar  4 17:44:48 2010
New Revision: 97764

URL: http://llvm.org/viewvc/llvm-project?rev=97764&view=rev
Log:
Add metadata example.

Modified:
    llvm/trunk/docs/LangRef.html

Modified: llvm/trunk/docs/LangRef.html
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/LangRef.html?rev=97764&r1=97763&r2=97764&view=diff
==============================================================================
--- llvm/trunk/docs/LangRef.html (original)
+++ llvm/trunk/docs/LangRef.html Thu Mar  4 17:44:48 2010
@@ -2520,6 +2520,23 @@
    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>
 
 





More information about the llvm-commits mailing list