Int32Ty = llvm::Type::getInt32Ty(VMContext);
Int64Ty = llvm::Type::getInt64Ty(VMContext);
- IntPtrTy =
- TheModule.getPointerSize() == llvm::Module::Pointer32 ? Int32Ty : Int64Ty;
+ IntPtrTy = CGM.getDataLayout().getPointerSize() == 32 ? Int32Ty : Int64Ty;
// Object type
QualType UnqualIdTy = CGM.getContext().getObjCIdType();
/// bitfield / with the 63rd bit set will be 1<<64.
llvm::Constant *CGObjCGNU::MakeBitField(ArrayRef<bool> bits) {
int bitCount = bits.size();
- int ptrBits =
- (TheModule.getPointerSize() == llvm::Module::Pointer32) ? 32 : 64;
+ int ptrBits = CGM.getDataLayout().getPointerSize();
if (bitCount < ptrBits) {
uint64_t val = 1;
for (int i=0 ; i<bitCount ; ++i) {