[llvm-commits] [PATCH] Add bindings to Builder::getInsertBlock and BasicBlock::getParent.

Gordon Henriksen gordonhenriksen at mac.com
Tue Mar 18 18:18:11 PDT 2008


On Mar 16, 2008, at 17:07, Erick Tryzelaar wrote:

> This exposes getInsertBlock and getParent to both the llvm-c and  
> ocaml bindings.


Thanks. Applied with some modifications:

http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20080317/059864.html

• I bound the full set of getParent methods.
• Detached instructions, blocks, and globals are not exposed in the  
IR, so I returned an llvalue rather than an llvalue option from  
block_parent.
• Likewise for builders. However, builders can be uninitialized, so I  
raise Not_found from insertion_point b if b is uninitialized.
• Should in the future detached objects become legal, we can raise  
Not_found from the various *_parent functions as well. This avoids  
requiring user code to write matchers for impossible conditions.

— Gordon

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20080318/0d3f73d0/attachment.html>


More information about the llvm-commits mailing list