[LLVMdev] Why clang++ doesn't set 'noreturn' flag on declarations of __cxa_throw and _Unwind_Resume_or_Rethrow ?
John McCall
rjmccall at apple.com
Thu Jul 15 17:51:49 PDT 2010
On Jul 15, 2010, at 3:31 PM, Yuri wrote:
> When I compile some code with the near-trunk clang++ I get this:
Please send clang-specific questions to cfe-dev at cs.uiuc.edu.
> ...
> tail call void @_Unwind_Resume_or_Rethrow(i8* %exn2) noreturn
> unreachable
> ...
> declare void @_Unwind_Resume_or_Rethrow(i8*)
> ...
>
> Same with __cxa_throw. 'noreturn' is missing on declarations.
> This seems to be a bug.
It really shouldn't make a difference; the call site should take priority anyway.
> Also can _Unwind_Resume_or_Rethrow actually return? When I run some
> simple exception code in JIT I see that this function actually returns
> and then SEGVs.
I have no idea what system you're on, but _Unwind_Resume_or_Rethrow really
isn't allowed to return.
John.
More information about the llvm-dev
mailing list