-#define GET_CONST_VAL(TY, CLASS) \
- case Type::TY##TyID: Result.TY##Val = cast<CLASS>(C)->getValue(); break
- GET_CONST_VAL(Bool , ConstantBool);
- GET_CONST_VAL(UByte , ConstantUInt);
- GET_CONST_VAL(SByte , ConstantSInt);
- GET_CONST_VAL(UShort , ConstantUInt);
- GET_CONST_VAL(Short , ConstantSInt);
- GET_CONST_VAL(UInt , ConstantUInt);
- GET_CONST_VAL(Int , ConstantSInt);
- GET_CONST_VAL(ULong , ConstantUInt);
- GET_CONST_VAL(Long , ConstantSInt);
- GET_CONST_VAL(Float , ConstantFP);
- GET_CONST_VAL(Double , ConstantFP);
+#define GET_CONST_VAL(TY, CTY, CLASS) \
+ case Type::TY##TyID: Result.TY##Val = (CTY)cast<CLASS>(C)->getValue(); break
+ GET_CONST_VAL(Bool , bool , ConstantBool);
+ GET_CONST_VAL(UByte , unsigned char , ConstantUInt);
+ GET_CONST_VAL(SByte , signed char , ConstantSInt);
+ GET_CONST_VAL(UShort , unsigned short, ConstantUInt);
+ GET_CONST_VAL(Short , signed short , ConstantSInt);
+ GET_CONST_VAL(UInt , unsigned int , ConstantUInt);
+ GET_CONST_VAL(Int , signed int , ConstantSInt);
+ GET_CONST_VAL(ULong , uint64_t , ConstantUInt);
+ GET_CONST_VAL(Long , int64_t , ConstantSInt);
+ GET_CONST_VAL(Float , float , ConstantFP);
+ GET_CONST_VAL(Double , double , ConstantFP);