================
@@ -350,11 +350,22 @@ the destructor. Therefore, this cleanup handler is marked 
as eh_only.
 Try-catch blocks will be represented, as they are in the ClangIR
 incubator project, using a `cir.try` operation.
 
+The `cir.catch_param` operation is used to represent the capturing of the
+exception object in an ABI-independent way. When the catch handler includes
+a source variable representing the exception object, the result of the
+`cir.catch_param` operation will be stored to an alloca object for the
+source variable.  If the handler is a catch-all, the `cir.catch_param` 
operation
+will return a pointer to void, but this cannot be captured by a source 
variable.
----------------
erichkeane wrote:

Does this interact ok with `std::current_exception`?  THe user can at least 
access the exception object that way, and it would be nice/useful/etc if this 
infra was used that way too.  (though note `current_exception` can be called 
from anywhere).

https://github.com/llvm/llvm-project/pull/181284
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to