[LLVMdev] Assertion failure in llc when using exception handling

Duncan Sands baldrick at free.fr
Thu Jun 10 01:28:55 PDT 2010

Hi Shivram,

> I'm trying to compile an llvm program which makes use of exception
> handling. While compiling the code with llc i get the following
> assertion failure

an unfortunate weakness of the code generators is that they require calls to
eh.selector to be in a landing pad (landing pad = where an invoke unwinds
to).  They can also handle some simple cases when the selector call is outside
the landing pad.  In practice, as long as the original call to eh.selector that
you generate is in a landing pad, and at the start of the landing pad (just
after the eh.exception call and any phi nodes) it is intended that the current
logic is good enough to handle any situations caused by optimization.  Was the
original call at the start of a landing pad?

By the way, there are various ways of fixing this codegen problem.  But since
there is a plan to redesign exception handling in LLVM, it seems pointless to
spend much time on it.



More information about the llvm-dev mailing list