}
/// getSizeOf constant expr - computes the size of a type in a target
- /// independent way (Note: the return type is UInt but the object is not
+ /// independent way (Note: the return type is ULong but the object is not
/// necessarily a ConstantUInt).
///
static Constant *getSizeOf(const Type *Ty);
}
Constant *ConstantExpr::getSizeOf(const Type *Ty) {
- // sizeof is implemented as: (unsigned) gep (Ty*)null, 1
+ // sizeof is implemented as: (ulong) gep (Ty*)null, 1
return getCast(
- getGetElementPtr(
- getNullValue(PointerType::get(Ty)),
- std::vector<Constant*>(1, ConstantInt::get(Type::UIntTy, 1))),
- Type::UIntTy);
+ getGetElementPtr(getNullValue(PointerType::get(Ty)),
+ std::vector<Constant*>(1, ConstantInt::get(Type::UIntTy, 1))),
+ Type::ULongTy);
}
Constant *ConstantExpr::getTy(const Type *ReqTy, unsigned Opcode,