This patch is orignally made by Nick Barnes, adapted by Bernard Helyer and finally submitted in its current form by Jakob Bornecrantz.
The LLVM-C interface provides no means to construct catchswitch, catchpad, catchret, cleanuppad, or cleanupret instructions, or to attach a funclet operand bundle to call or invoke instructions (which is required in cleanuppad blocks).
This patch provides the most basic functionality, and is sufficient for the project I'm working on. More could be done, but this much is required to get anywhere.
Please don't add version without context. This is deprecated.