Assertion Failure: Not all catch info was assigned to a landing pad

I’m getting a very stubborn assertion failure that I don’t understand. After I insert a call to an externally defined function into an invoked function, llc spits out the following assertion failure when I compile the bytecode:

llc: SelectionDAGISel.cpp:4912: virtual bool llvm::SelectionDAGISel::runOnFunction(llvm::Function&): Assertion `FuncInfo.CatchInfoFound.size() == FuncInfo.CatchInfoLost.size() && “Not all catch info was assigned to a landing pad!”’ failed.

I looked at the SelectionDAGISel.cpp code but I have no idea what the problem is or how I can fix it. I’ve tried setting different parameter attributes to no avail. Maybe somebody can explain this failure to me?

Many thanks,

Nevermind. Problem solved. Was putting the function call at the front of some landing pad basic blocks and forking the control flow afterwards, which confused llc.

Sorry for the trouble.