UIntTy, IntTy, and SByteTy

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

UIntTy, IntTy, and SByteTy

Ryan M. Lefever
I have llvm code that uses llvm::Type::UIntTy, llvm::Type::IntTy, and
llvm::Type::SByteTy, but these are now removed.  What should I use for
their replacement.  If I need to specify a size for IntTy and UIntTy, I
want them to be the same size that an integer would be in C on the
platform on which I'm compiling.  So, if I need the sizes is their a way
to fetch the size that an integer would be in C on the platform that my
code is compiling on?

Thanks,
Ryan

_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: UIntTy, IntTy, and SByteTy

Reid Spencer-2
On Tue, 2007-03-06 at 22:22 -0600, Ryan M. Lefever wrote:
> I have llvm code that uses llvm::Type::UIntTy, llvm::Type::IntTy, and
> llvm::Type::SByteTy, but these are now removed.  What should I use for
> their replacement.

UIntTy -> Int32Ty
IntTy -> Int32Ty
SByteTy -> Int8Ty

>  If I need to specify a size for IntTy and UIntTy, I
> want them to be the same size that an integer would be in C on the
> platform on which I'm compiling.  So, if I need the sizes is their a way
> to fetch the size that an integer would be in C on the platform that my
> code is compiling on?

llvm::IntegerType::get(sizeof(int)*8);

Reid.

_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev