[PATCH] Expose all of the Value hierarchy to the C API

Ben Longbons brlongbons at gmail.com
Mon May 6 17:11:34 PDT 2013


I was motivated to do this after I discovered that it's possible to
create a ConstantDataArray with the C API, but not determine if a
Value is a ConstantDataArray.

I created this patch to expose the entire hierarchy, which led me to
discover a couple of odd cases:
 - ConstantExpr having private subclasses is not ugly.
 - PseudoSourceValue being in CodeGen is only slightly ugly.
 - IntrinsicInst being a fake subclass is fairly ugly, but it was
useful, and besides removing it might break existing callers.
 - Operator is really ugly and deserves to die, so I did not expose it.

I'm o11c on IRC btw. I gave a whitespace-only patch to baldrick that
he already committed to keep this one cleaner.

Thanks,
-Ben
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Expose-all-of-the-Value-hierarchy-to-the-C-API.patch
Type: application/octet-stream
Size: 4350 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130506/3924eb9f/attachment.obj>


More information about the llvm-commits mailing list