[LLVMdev] SignlessTypes: Removal of Constant[SU]Int
rspencer at reidspencer.com
Fri Oct 20 02:27:31 CDT 2006
Just in case you're not on the llvm-commits list, the classes
ConstantSInt and ConstantUInt have been removed from the LLVM C++ IR.
This affects only the CVS HEAD. A patch to llvm-gcc4 to compensate for
this should be available in the next day or so, depending on when it
gets committed and updated.
If you're maintaining a language front end or other llvm-based software,
you'll probably need to make a few simple changes. In most cases just
removing the "S" or "U" from the class name should be all you need. For
ConstantSInt::get(Type::IntTy, 0) -> ConstantInt::get(Type::IntTy, 0)
Changes To Make:
1. ConstantUInt -> ConstantInt
2. ConstantSInt -> ConstantInt
3. The getRawValue method is gone. Use getZExtValue() instead.
4. The getValue method is gone. Use either getZExtValue (zero extended)
getSExtValue (sign extended) depending on the context.
These changes pass both dejagnu and llvm-test test suites at the time of
More information about the LLVMdev