rsmith added a comment.

In https://reviews.llvm.org/D42092#983892, @rjmccall wrote:

> This is definitely something that the personality function should handle.  If 
> we want to do heroic things in the absence of personality function support, 
> we can, but the code should at least be written to be conditional on 
> personality support.


I suppose the question is, do we want to do such heroic things?

Also, we don't have a personality function that can get this right, nor even a 
concrete design proposed for one. It doesn't seem too hard -- we'd need to 
extend the EH table to indicate catch-by-reference -- but there's nothing for 
this to be made conditional on right now. I can easily add a CodeGenOption that 
turns this all off, if you'd like.

> If we can rev the personality function, we should also fix the longstanding 
> problem with references to pointers to classes.

Which issue is that? (And does this patch fail to address it? It should prevent 
catching `Derived*` by (non-const) `Base *&` while still allowing catch by 
`Base *const&`, if that's the issue you're referring to.)


Repository:
  rC Clang

https://reviews.llvm.org/D42092



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
  • [PATCH] D42092: i... Richard Smith - zygoloid via Phabricator via cfe-commits

Reply via email to