[LLVMdev] landingpad and null filter clause

Richard Smith richard at metafoo.co.uk
Sun May 11 13:23:06 PDT 2014


http://llvm.org/docs/ExceptionHandling.html#try-catch says:

"The array argument to filter may be empty; for example, “[0 x i8**]
undef”. This means that the landingpad should always be entered. (Note that
such a filter would not be equivalent to “catch i8* null”, because filter
and catch produce negative and positive selector values respectively.)"

The verifier disagrees with this claim:

Filter operand is not an array of constants!
  %1 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)*
@__gxx_personality_v0 to i8*)
          filter [0 x i8**] undef
LLVM ERROR: Broken function found, compilation aborted!

Is the documentation out of date, or is the verifier doing the wrong thing,
or did I misunderstand what the documentation meant?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140511/337b0513/attachment.html>


More information about the llvm-dev mailing list