[llvm-commits] TypeBuilder helper class

Dan Gohman gohman at apple.com
Thu Apr 2 14:48:08 PDT 2009


On Apr 2, 2009, at 11:37 AM, Jeffrey Yasskin wrote:

> When declaring global variables and functions that are defined in the
> Python C libraries, I've found the attached class helpful.
> TypeBuilder<void(int*, size_t*)>::get() will return an LLVM Type*
> corresponding to that function type, which is otherwise quite verbose
> to build up. Let me know what you think.

This looks neat, though it's problematic for cross-compiling, where
the host's int and size_t may be different from those of the target.
It's not a problem for everyone, but an LLVM in-tree type builder
utility should support cross compilation.

Dan




More information about the llvm-commits mailing list