r231245 - Adjust the changes from r230255 to bail out if the backend can't lower

John McCall rjmccall at apple.com
Wed Mar 4 14:33:48 PST 2015


> On Mar 4, 2015, at 6:25 AM, Joerg Sonnenberger <joerg at bec.de> wrote:
> Author: joerg
> Date: Wed Mar  4 08:25:35 2015
> New Revision: 231245
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=231245&view=rev
> Log:
> Adjust the changes from r230255 to bail out if the backend can't lower
> __builtin_setjmp/__builtin_longjmp and don't fall back to the libc
> functions.

Thank you.  I think it would be reasonable for the AST-level TargetInfo to answer this question and then diagnose it in Sema.  We generally prefer Sema diagnostics over IRGen diagnostics, all else being equal.

There’s already special checking for __builtin_longjmp in SemaChecking.cpp because it only supports a constant 1 for the second parameter; it should be straightforward to check this there, and then add a similar check to __builtin_setjmp 

John.



More information about the cfe-commits mailing list