Fix test gmlt.test by moving its Inputs where expected.
[oota-llvm.git] / docs / ExceptionHandling.rst
index 2f09155dff2f3b8fbc0e716ac7f30f70eb505ea1..5b495d9863cdd0f013516cda6b02e4ef8a68605f 100644 (file)
@@ -162,11 +162,11 @@ pad to the back end. For C++, the ``landingpad`` instruction returns a pointer
 and integer pair corresponding to the pointer to the *exception structure* and
 the *selector value* respectively.
 
-The ``landingpad`` instruction takes a reference to the personality function to
-be used for this ``try``/``catch`` sequence. The remainder of the instruction is
-a list of *cleanup*, *catch*, and *filter* clauses. The exception is tested
-against the clauses sequentially from first to last. The clauses have the
-following meanings:
+The ``landingpad`` instruction looks for a reference to the personality
+function to be used for this ``try``/``catch`` sequence in the parent
+function's attribute list. The instruction contains a list of *cleanup*,
+*catch*, and *filter* clauses. The exception is tested against the clauses
+sequentially from first to last. The clauses have the following meanings:
 
 -  ``catch <type> @ExcType``
 
@@ -401,6 +401,20 @@ intrinsic serves as a placeholder to delimit code before a catch handler is
 outlined.  After the handler is outlined, this intrinsic is simply removed.
 
 
+.. _llvm.eh.exceptionpointer:
+
+``llvm.eh.exceptionpointer``
+----------------------------
+
+.. code-block:: llvm
+
+  i8 addrspace(N)* @llvm.eh.padparam.pNi8(token %catchpad)
+
+
+This intrinsic retrieves a pointer to the exception caught by the given
+``catchpad``.
+
+
 SJLJ Intrinsics
 ---------------
 
@@ -701,7 +715,7 @@ all of the new IR instructions:
 
   invoke.cont.3:                                    ; preds = %catch.body
     %9 = load i32, i32* %e, align 4
-    catchret %catch label %return
+    catchret %catch to label %return
 
   catchend:                                         ; preds = %lpad.catch, %catch.body
     catchendpad unwind label %lpad.terminate