[llvm-commits] TypeBuilder helper class

Chris Lattner clattner at apple.com
Thu Apr 2 17:35:50 PDT 2009


On Apr 2, 2009, at 2:48 PM, Dan Gohman wrote:
> 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.

I agree, this looks very cool for JIT type applications, but in  
general, we do want to support cross builds.

-Chris



More information about the llvm-commits mailing list