[llvm-commits] TypeBuilder helper class

Chris Lattner clattner at apple.com
Fri Apr 3 10:50:21 PDT 2009


On Apr 2, 2009, at 9:06 PM, Nick Lewycky wrote:
>> 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.
>
> What makes this different from the IRBuilder is that it's  
> reflective. We
> could have reflection based and non-reflection based IRBuilder and
> TypeBuilders independently. What you're asking for is a non-reflection
> based TypeBuilder, which would be useful for the reasons you mention,
> but would have a different API and is out of scope for this change.  
> Agreed?

Instead of using native integer types, how about using place holders:


typedef sometype<64> LLVMInt64;
typedef sometype<64> LLVMInt32;

   ConvertType<LLVMInt64**>

instead of:

   ConvertType<int64_t**>

?

-Chris



More information about the llvm-commits mailing list