[llvm-commits] Pointer subtraction for IRBuilder

Jeffrey Yasskin jyasskin at google.com
Thu Apr 9 14:08:32 PDT 2009


The attached file implements IRBuilder::CreatePSub(), which performs a
C-style pointer difference on its arguments. The included test passes,
but it involves a warning that "ISO C++ forbids casting between
pointer-to-function and pointer-to-object", which I don't know how to
get rid of given the ExecutionEngine interface. I was also hoping to
assert that constant folding could produce a constant integer, but I
couldn't figure that out.

Let me know what you think. (And I'm now subscribed, so I'll get your answer.)
Jeffrey
-------------- next part --------------
A non-text attachment was scrubbed...
Name: psub.patch
Type: application/octet-stream
Size: 4656 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20090409/11a35603/attachment.obj>


More information about the llvm-commits mailing list