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
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 @@
<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 @@
</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 @@
<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 @@
<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 @@
<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