[LLVMdev] Why clang++ doesn't set 'noreturn' flag on declarations of __cxa_throw and _Unwind_Resume_or_Rethrow ?

Yuri yuri at rawbw.com
Thu Jul 15 15:31:15 PDT 2010

When I compile some code with the near-trunk clang++ I get this:
   tail call void @_Unwind_Resume_or_Rethrow(i8* %exn2) noreturn
declare void @_Unwind_Resume_or_Rethrow(i8*)

Same with __cxa_throw. 'noreturn' is missing on declarations.
This seems to be a bug.

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.


More information about the llvm-dev mailing list