Use static_cast instead of reinterpret_cast for casting void*.
[oota-llvm.git] / docs / LangRef.html
index 0fcc26313ef04906ce98180e386d192c808eb99a..cd8b7e9f967a5e607af176bccbef90a141901e1f 100644 (file)
@@ -466,7 +466,7 @@ All Global Variables and Functions have one of the following types of linkage:
 
 <dl>
 
-  <dt><tt><b><a name="linkage_internal">internal</a></b></tt> </dt>
+  <dt><tt><b><a name="linkage_internal">internal</a></b></tt>: </dt>
 
   <dd>Global values with internal linkage are only directly accessible by
   objects in the current module.  In particular, linking code into a module with
@@ -485,14 +485,22 @@ All Global Variables and Functions have one of the following types of linkage:
   allowed to be discarded.
   </dd>
 
+  <dt><tt><b><a name="linkage_common">common</a></b></tt>: </dt>
+
+  <dd>"<tt>common</tt>" linkage is exactly the same as <tt>linkonce</tt> 
+  linkage, except that unreferenced <tt>common</tt> globals may not be
+  discarded.  This is used for globals that may be emitted in multiple 
+  translation units, but that are not guaranteed to be emitted into every 
+  translation unit that uses them.  One example of this is tentative
+  definitions in C, such as "<tt>int X;</tt>" at global scope.
+  </dd>
+
   <dt><tt><b><a name="linkage_weak">weak</a></b></tt>: </dt>
 
-  <dd>"<tt>weak</tt>" linkage is exactly the same as <tt>linkonce</tt> linkage,
-  except that unreferenced <tt>weak</tt> globals may not be discarded.  This is
-  used for globals that may be emitted in multiple translation units, but that
-  are not guaranteed to be emitted into every translation unit that uses them.
-  One example of this are common globals in C, such as "<tt>int X;</tt>" at 
-  global scope.
+  <dd>"<tt>weak</tt>" linkage is the same as <tt>common</tt> linkage, except
+  that some targets may choose to emit different assembly sequences for them 
+  for target-dependent reasons.  This is used for globals that are declared 
+  "weak" in C source code.
   </dd>
 
   <dt><tt><b><a name="linkage_appending">appending</a></b></tt>: </dt>
@@ -1037,16 +1045,16 @@ classifications:</p>
       <td><a href="#t_integer">integer</a>,
           <a href="#t_floating">floating point</a>,
           <a href="#t_pointer">pointer</a>,
-          <a href="#t_vector">vector</a>
+          <a href="#t_vector">vector</a>,
           <a href="#t_struct">structure</a>,
           <a href="#t_array">array</a>,
+          <a href="#t_label">label</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_integer">integer</a>,
           <a href="#t_floating">floating point</a>.</td>
     </tr>
     <tr>
@@ -2909,7 +2917,7 @@ or array element from an aggregate value.
 The first operand of an '<tt>extractvalue</tt>' instruction is a
 value of <a href="#t_struct">struct</a> or <a href="#t_array">array</a>
 type.  The operands are constant indices to specify which value to extract
-in the same manner as indices in a
+in a similar manner as indices in a
 '<tt><a href="#i_getelementptr">getelementptr</a></tt>' instruction.
 </p>
 
@@ -2923,7 +2931,7 @@ the index operands.
 <h5>Example:</h5>
 
 <pre>
-  %result = extractvalue {i32, float} %agg, i32 0    <i>; yields i32</i>
+  %result = extractvalue {i32, float} %agg, 0    <i>; yields i32</i>
 </pre>
 </div>
 
@@ -2938,7 +2946,7 @@ the index operands.
 <h5>Syntax:</h5>
 
 <pre>
-  &lt;result&gt; = insertvalue &lt;aggregate type&gt; &lt;val&gt;, &lt;ty&gt; &lt;val&gt;, i32 &lt;idx&gt;    <i>; yields &lt;n x &lt;ty&gt;&gt;</i>
+  &lt;result&gt; = insertvalue &lt;aggregate type&gt; &lt;val&gt;, &lt;ty&gt; &lt;val&gt;, &lt;idx&gt;    <i>; yields &lt;n x &lt;ty&gt;&gt;</i>
 </pre>
 
 <h5>Overview:</h5>
@@ -2956,7 +2964,7 @@ The first operand of an '<tt>insertvalue</tt>' instruction is a
 value of <a href="#t_struct">struct</a> or <a href="#t_array">array</a> type.
 The second operand is a first-class value to insert.
 The following operands are constant indices
-indicating the position at which to insert the value in the same manner as
+indicating the position at which to insert the value in a similar manner as
 indices in a
 '<tt><a href="#i_getelementptr">getelementptr</a></tt>' instruction.
 The value to insert must have the same type as the value identified
@@ -2973,7 +2981,7 @@ specified by the indices is that of <tt>elt</tt>.
 <h5>Example:</h5>
 
 <pre>
-  %result = insertvalue {i32, float} %agg, i32 1, i32 0    <i>; yields {i32, float}</i>
+  %result = insertvalue {i32, float} %agg, 1, 0    <i>; yields {i32, float}</i>
 </pre>
 </div>