diff options
| author | Nick Lewycky <nicholas@mxc.ca> | 2009-05-30 05:06:04 +0000 | 
|---|---|---|
| committer | Nick Lewycky <nicholas@mxc.ca> | 2009-05-30 05:06:04 +0000 | 
| commit | 7a0370f66ab5739f42ffe822f33494e0de9b182b (patch) | |
| tree | 45b56951ca455c4f0fffdc0e55733b84608162ef /docs | |
| parent | c5ca713b8073d9fe95b258d0c01328d020df3357 (diff) | |
| download | external_llvm-7a0370f66ab5739f42ffe822f33494e0de9b182b.zip external_llvm-7a0370f66ab5739f42ffe822f33494e0de9b182b.tar.gz external_llvm-7a0370f66ab5739f42ffe822f33494e0de9b182b.tar.bz2 | |
Give embedded metadata its own type instead of relying on EmptyStructTy.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72610 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/LangRef.html | 40 | 
1 files changed, 30 insertions, 10 deletions
| diff --git a/docs/LangRef.html b/docs/LangRef.html index 9fc14b4..f0ec684 100644 --- a/docs/LangRef.html +++ b/docs/LangRef.html @@ -41,6 +41,7 @@            <li><a href="#t_floating">Floating Point Types</a></li>            <li><a href="#t_void">Void Type</a></li>            <li><a href="#t_label">Label Type</a></li> +          <li><a href="#t_metadata">Metadata Type</a></li>          </ol>        </li>        <li><a href="#t_derived">Derived Types</a> @@ -1254,14 +1255,16 @@ classifications:</p>            <a href="#t_vector">vector</a>,            <a href="#t_struct">structure</a>,            <a href="#t_array">array</a>, -          <a href="#t_label">label</a>. +          <a href="#t_label">label</a>, +          <a href="#t_metadata">metadata</a>.        </td>      </tr>      <tr>        <td><a href="#t_primitive">primitive</a></td>        <td><a href="#t_label">label</a>,            <a href="#t_void">void</a>, -          <a href="#t_floating">floating point</a>.</td> +          <a href="#t_floating">floating point</a>, +          <a href="#t_metadata">metadata</a>.</td>      </tr>      <tr>        <td><a href="#t_derived">derived</a></td> @@ -1337,6 +1340,22 @@ system.</p>  </pre>  </div> +<!-- _______________________________________________________________________ --> +<div class="doc_subsubsection"> <a name="t_metadata">Metadata Type</a> </div> + +<div class="doc_text"> +<h5>Overview:</h5> +<p>The metadata type represents embedded metadata. The only derived type that +may contain metadata is <tt>metadata*</tt> or a function type that returns or +takes metadata typed parameters, but not pointer to metadata types.</p> + +<h5>Syntax:</h5> + +<pre> +  metadata +</pre> +</div> +  <!-- ======================================================================= -->  <div class="doc_subsection"> <a name="t_derived">Derived Types</a> </div> @@ -1866,9 +1885,10 @@ constants and smaller complex constants.</p>    <dt><b>Metadata node</b></dt>    <dd>A metadata node is a structure-like constant with the type of an empty -  struct.  For example: "<tt>{ } !{ i32 0, { } !"test" }</tt>". Unlike other -  constants that are meant to be interpreted as part of the instruction stream, -  metadata is a place to attach additional information such as debug info. +  struct.  For example: "<tt>metadata !{ i32 0, metadata !"test" }</tt>". +  Unlike other constants that are meant to be interpreted as part of the +  instruction stream, metadata is a place to attach additional information such +  as debug info.    </dd>  </dl> @@ -2046,9 +2066,9 @@ following is the syntax for constant expressions:</p>  <p>Embedded metadata provides a way to attach arbitrary data to the  instruction stream without affecting the behaviour of the program.  There are -two metadata primitives, strings and nodes. All metadata has the type of an -empty struct and is identified in syntax by a preceding exclamation point -('<tt>!</tt>'). +two metadata primitives, strings and nodes. All metadata has the +<tt>metadata</tt> type and is identified in syntax by a preceding exclamation +point ('<tt>!</tt>').  </p>  <p>A metadata string is a string surrounded by double quotes.  It can contain @@ -2058,12 +2078,12 @@ the two digit hex code.  For example: "<tt>!"test\00"</tt>".  <p>Metadata nodes are represented with notation similar to structure constants  (a comma separated list of elements, surrounded by braces and preceeded by an -exclamation point).  For example: "<tt>!{ { } !"test\00", i32 10}</tt>". +exclamation point).  For example: "<tt>!{ metadata !"test\00", i32 10}</tt>".  </p>  <p>A metadata node will attempt to track changes to the values it holds. In  the event that a value is deleted, it will be replaced with a typeless -"<tt>null</tt>", such as "<tt>{ } !{null, i32 0}</tt>".</p>  +"<tt>null</tt>", such as "<tt>metadata !{null, i32 10}</tt>".</p>   <p>Optimizations may rely on metadata to provide additional information about  the program that isn't available in the instructions, or that isn't easily | 
