Index: docs/LangRef.html
===================================================================
--- docs/LangRef.html (revision 136556)
+++ docs/LangRef.html (working copy)
@@ -124,6 +124,7 @@
<li><a href="#i_indirectbr">'<tt>indirectbr</tt>' Instruction</a></li>
<li><a href="#i_invoke">'<tt>invoke</tt>' Instruction</a></li>
<li><a href="#i_unwind">'<tt>unwind</tt>' Instruction</a></li>
+ <li><a href="#i_resume">'<tt>resume</tt>' Instruction</a></li>
<li><a href="#i_unreachable">'<tt>unreachable</tt>' Instruction</a></li>
</ol>
</li>
@@ -201,6 +202,7 @@
<li><a href="#i_select">'<tt>select</tt>' Instruction</a></li>
<li><a href="#i_call">'<tt>call</tt>' Instruction</a></li>
<li><a href="#i_va_arg">'<tt>va_arg</tt>' Instruction</a></li>
+ <li><a href="#i_landingpad">'<tt>landingpad</tt>' Instruction</a></li>
</ol>
</li>
</ol>
@@ -3023,13 +3025,14 @@
control flow, not values (the one exception being the
'<a href="#i_invoke"><tt>invoke</tt></a>' instruction).</p>
-<p>There are seven different terminator instructions: the
+<p>There are eight different terminator instructions: the
'<a href="#i_ret"><tt>ret</tt></a>' instruction, the
'<a href="#i_br"><tt>br</tt></a>' instruction, the
'<a href="#i_switch"><tt>switch</tt></a>' instruction, the
'<a href="#i_indirectbr">'<tt>indirectbr</tt></a>' Instruction, the
'<a href="#i_invoke"><tt>invoke</tt></a>' instruction, the
- '<a href="#i_unwind"><tt>unwind</tt></a>' instruction, and the
+ '<a href="#i_unwind"><tt>unwind</tt></a>' instruction, the
+ '<a href="#i_resume"><tt>resume</tt></a>' instruction, and the
'<a href="#i_unreachable"><tt>unreachable</tt></a>' instruction.</p>
<!-- _______________________________________________________________________ -->
@@ -3350,6 +3353,35 @@
</div>
+ <!-- _______________________________________________________________________ -->
+
+<h4>
+ <a name="i_resume">'<tt>resume</tt>' Instruction</a>
+</h4>
+
+<div>
+
+<h5>Syntax:</h5>
+<pre>
+ resume <type> <value>
+</pre>
+
+<h5>Overview:</h5>
+<p>The '<tt>resume</tt>' instruction is a terminator instruction that has no
+ successors. Its operand must have the same type as the result of any
+ '<tt>landingpad</tt>' instruction in the same function.</p>
+
+<h5>Semantics:</h5>
+<p>The '<tt>resume</tt>' instruction resumes propagation of an existing
+ (in-flight) exception.</p>
+
+<h5>Example:</h5>
+<pre>
+ resume { i8*, i32 } %exn
+/pre>
+
+</div>
+
<!-- _______________________________________________________________________ -->
<h4>
@@ -5937,6 +5969,80 @@
</div>
+<!-- _______________________________________________________________________ -->
+<h4>
+ <a name="i_landingpad">'<tt>landingpad</tt>' Instruction</a>
+</h4>
+
+<div>
+
+<h5>Syntax:</h5>
+<pre>
+ <resultval> = landingpad <somety> personality <ty> <pers_fn> cleanup? <clause>+
+ clause := catch <ty> {, <ty>}*
+ clause := filter <ty> {, <ty>}*
+</pre>
+
+<h5>Overview:</h5>
+<p>The '<tt>landingpad</tt>' instruction is used to specify a basic block is a
+ landing pad. It defines values supplied by the personality function
+ '<tt>pers_fn</tt>' upon re-entry to the function. The <tt>resultval</tt> has
+ the type <tt>somety</tt>. The '<tt>landingpad</tt>' instruction must contain
+ <em>at least</em> one <tt>clause</tt> or the <tt>cleanup</tt> flag.</p>
+
+<p>There are several restrictions:</p>
+
+<ul>
+ <li>A landing pad block is a basic block which is the unwind destination of an
+ '<tt>invoke</tt>' instruction.</li>
+ <li>A landing pad blcok must have a '<tt>landingpad</tt>' instruction as its
+ first non-PHI instruction.</li>
+ <li>The '<tt>landingpad</tt>' instruction must be the first non-PHI
+ instruction in the landing pad block.</li>
+ <li>A basic block that is not a landing pad block may not include a
+ '<tt>landingpad</tt>' instruction.</li>
+ <li>Like indirect branches, splitting the critical edge to a landing pad block
+ requires considerable care, and <tt>SplitCriticalEdge</tt> will refuse to
+ do it.</li>
+ <li>All '<tt>landingpad</tt>' instructions in a function must have the same
+ personality function.</li>
+</ul>
+
+<h5>Arguments:</h5>
+<p>This instruction takes a <tt>pers_fn</tt> value. This is the personality
+ function associated with the unwinding mechanism. The optional
+ <tt>cleanup</tt> flag indicates that the landing pad block is a cleanup.</p>
+
+<p>A <tt>clause</tt> begins with the clause type — <tt>catch</tt>
+ or <tt>filter</tt> — and contains a list of global variables
+ representing the "types" that may be caught or filtered respectively.</p>
+
+<h5>Semantics:</h5>
+<p>The '<tt>landingpad</tt>' instruction defines the values which are set by the
+ personality function (<tt>pers_fn</tt>) upon re-entry to the function, and
+ therefore the "result type" of the <tt>landingpad</tt> instruction. As with
+ calling conventions, how the personality function results are represented in
+ LLVM IR is target specific.</p>
+
+<h5>Example:</h5>
+<pre>
+ ;; A landing pad which can catch an integer or double and which can throw only
+ ;; a const char *.
+ %res = landingpad { i8*, i32 } personality i32 (...)* @__gxx_personality_v0
+ catch i8** @_ZTIi, i8** @_ZTId
+ filter i8** @_ZTIPKc
+
+ ;; A landing pad that is a cleanup.
+ %res = landingpad { i8*, i32 } personality i32 (...)* @__gxx_personality_v0
+ cleanup
+</pre>
+
+</div>
+
+</div>
+
+</div>
+
<!-- *********************************************************************** -->
<h2><a name="intrinsics">Intrinsic Functions</a></h2>
<!-- *********************************************************************** -->