diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2014-01-09 00:17:51 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2014-01-09 00:17:51 +0000 |
commit | 0d84069e1766c00af5ae6658b2f0d539f4524762 (patch) | |
tree | d80baecc531652bc986db0dcd70bfc4670970b1a | |
parent | bb4b86af83240da5ef5aedd850eb2ffea316da68 (diff) | |
download | bcm5719-llvm-0d84069e1766c00af5ae6658b2f0d539f4524762.tar.gz bcm5719-llvm-0d84069e1766c00af5ae6658b2f0d539f4524762.zip |
Used the DataLayout methods instead of the Module methods.
llvm-svn: 198815
-rw-r--r-- | clang/lib/CodeGen/CGObjCGNU.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/clang/lib/CodeGen/CGObjCGNU.cpp b/clang/lib/CodeGen/CGObjCGNU.cpp index fbeb08ab514..6cc8ab4dd21 100644 --- a/clang/lib/CodeGen/CGObjCGNU.cpp +++ b/clang/lib/CodeGen/CGObjCGNU.cpp @@ -947,8 +947,7 @@ CGObjCGNU::CGObjCGNU(CodeGenModule &cgm, unsigned runtimeABIVersion, 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(); @@ -1996,8 +1995,7 @@ void CGObjCGNU::GenerateProtocolHolderCategory() { /// 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) { |