[LLVMdev] landingpad instruction documentation is vague

Yuri
Tue, 10 Jan 2012 19:21:52 -0000

I am new to the landingpad (which is relatively new too).
Documentation http://llvm.org/docs/LangRef.html#i_landingpad leaves some
questions open:

1. What happens when actual exception type isn't listed in catch or
filter clauses? Does it still return the corresponding structure like if
it was listed? Or behavior is undefined?
2. What is 'somety'? Shouldn't it maybe say "result_type"
instead? In
the instructions printed by clang++, somety is { i8*, i32 }.
3. What are the allowed values and types passed to catch clause? I see
that practically type is i8* and value is bitcast (i8** @<typeinfo> to
i8*). Is this target specific? If yes, documentation should mention
this, if not, it should describe them.
4. Example in documentation shows catch clause as "catch i8** @_ZTIi"
and clang++ generated example shows "catch i8* bitcast (i8** @_ZTIi to
i8*)"

Yuri