summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGObjCGNU.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2014-01-09 21:32:51 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2014-01-09 21:32:51 +0000
commit3cc5c2df9bc5a86017d52ff89233999f73f79e1d (patch)
treeafbbc3155c01ff8683eb79202690125430da2a7b /clang/lib/CodeGen/CGObjCGNU.cpp
parentde049233441fc12e2f01f0662bdd0bfc8b15111f (diff)
downloadbcm5719-llvm-3cc5c2df9bc5a86017d52ff89233999f73f79e1d.tar.gz
bcm5719-llvm-3cc5c2df9bc5a86017d52ff89233999f73f79e1d.zip
Use getPointerSizeInBits.
I introduced this bug in 198815. Thanks for Mark Lacey for noticing. Unfortunately, I have no idea how to test this code. llvm-svn: 198891
Diffstat (limited to 'clang/lib/CodeGen/CGObjCGNU.cpp')
-rw-r--r--clang/lib/CodeGen/CGObjCGNU.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CGObjCGNU.cpp b/clang/lib/CodeGen/CGObjCGNU.cpp
index 6cc8ab4dd21..9504d7dd116 100644
--- a/clang/lib/CodeGen/CGObjCGNU.cpp
+++ b/clang/lib/CodeGen/CGObjCGNU.cpp
@@ -947,7 +947,8 @@ CGObjCGNU::CGObjCGNU(CodeGenModule &cgm, unsigned runtimeABIVersion,
Int32Ty = llvm::Type::getInt32Ty(VMContext);
Int64Ty = llvm::Type::getInt64Ty(VMContext);
- IntPtrTy = CGM.getDataLayout().getPointerSize() == 32 ? Int32Ty : Int64Ty;
+ IntPtrTy =
+ CGM.getDataLayout().getPointerSizeInBits() == 32 ? Int32Ty : Int64Ty;
// Object type
QualType UnqualIdTy = CGM.getContext().getObjCIdType();
@@ -1995,7 +1996,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 = CGM.getDataLayout().getPointerSize();
+ int ptrBits = CGM.getDataLayout().getPointerSizeInBits();
if (bitCount < ptrBits) {
uint64_t val = 1;
for (int i=0 ; i<bitCount ; ++i) {
OpenPOWER on IntegriCloud