catch all

Hi,

that's right ! catch(all) has extra null arg,

eh_select = tail call i32 (i8*, i8*, ...)*
@llvm.eh.selector.i32(i8* %eh_ptr, i8* bitcast (i32 (...)*
@__gxx_personality_v0 to i8*), i8* null) ; <i32> [#uses=0]

I have doubt that :
the llvm-IR like above are all translated from catch(all) statement .

zhangzw

that's right ! catch(all) has extra null arg,

eh_select = tail call i32 (i8*, i8*, ...)*
@llvm.eh.selector.i32(i8* %eh_ptr, i8* bitcast (i32 (...)*
@__gxx_personality_v0 to i8*), i8* null) ; <i32> [#uses=0]

I have doubt that :
the llvm-IR like above are all translated from catch(all) statement .

I'm not sure what you are saying...

Ciao,

Duncan.

Hi,

sorry for my terible english !

I mean
there are only the catch(...) statement can be translate to the LLVM-IR :
eh_select = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector.i32(i8*
%eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i8*
null)

are there any other case can be translate to the same above LLVM-IR ?

best regards
zhangzw

Hi zhangzw,

I mean
there are only the catch(...) statement can be translate to the LLVM-IR :
eh_select = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector.i32(i8*
%eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i8*
null)

are there any other case can be translate to the same above LLVM-IR ?

currently llvm-gcc uses a horrible hack and *always* puts null (catch all)
at the end of the selector (if it wasn't already there) IIRC. This is needed
to get rethrowing of exceptions working properly when invokes are inlined
into other functions. I have a plan to fix this, and while it's not complete
I expect to commit some initial code this week sometime.

Ciao,

Duncan.