summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGObjC.cpp
diff options
context:
space:
mode:
authorKen Dyck <kd@kendyck.com>2011-01-19 01:58:38 +0000
committerKen Dyck <kd@kendyck.com>2011-01-19 01:58:38 +0000
commit705ba07ef08ac8221385e97caa9d8732a7a94bf3 (patch)
treefc3290fba0764b610df35885827ab41e11eadef5 /clang/lib/CodeGen/CGObjC.cpp
parent5d68663bfc2bb61111120ca4ef1b5c2570c4f2de (diff)
downloadbcm5719-llvm-705ba07ef08ac8221385e97caa9d8732a7a94bf3.tar.gz
bcm5719-llvm-705ba07ef08ac8221385e97caa9d8732a7a94bf3.zip
Replace calls to getTypeSize() and getTypeAlign() with their 'InChars'
counterparts where char units are needed. llvm-svn: 123805
Diffstat (limited to 'clang/lib/CodeGen/CGObjC.cpp')
-rw-r--r--clang/lib/CodeGen/CGObjC.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/clang/lib/CodeGen/CGObjC.cpp b/clang/lib/CodeGen/CGObjC.cpp
index 0837c578a79..1c64e3cb4c3 100644
--- a/clang/lib/CodeGen/CGObjC.cpp
+++ b/clang/lib/CodeGen/CGObjC.cpp
@@ -241,9 +241,10 @@ void CodeGenFunction::GenerateObjCGetter(ObjCImplementationDecl *IMP,
Types.ConvertType(getContext().VoidPtrTy)));
Args.push_back(std::make_pair(RV, getContext().VoidPtrTy));
// sizeof (Type of Ivar)
- uint64_t Size = getContext().getTypeSize(Ivar->getType()) / 8;
+ CharUnits Size = getContext().getTypeSizeInChars(Ivar->getType());
llvm::Value *SizeVal =
- llvm::ConstantInt::get(Types.ConvertType(getContext().LongTy), Size);
+ llvm::ConstantInt::get(Types.ConvertType(getContext().LongTy),
+ Size.getQuantity());
Args.push_back(std::make_pair(RValue::get(SizeVal),
getContext().LongTy));
llvm::Value *isAtomic =
@@ -374,9 +375,10 @@ void CodeGenFunction::GenerateObjCSetter(ObjCImplementationDecl *IMP,
RV = RValue::get(ArgAsPtrTy);
Args.push_back(std::make_pair(RV, getContext().VoidPtrTy));
// sizeof (Type of Ivar)
- uint64_t Size = getContext().getTypeSize(Ivar->getType()) / 8;
+ CharUnits Size = getContext().getTypeSizeInChars(Ivar->getType());
llvm::Value *SizeVal =
- llvm::ConstantInt::get(Types.ConvertType(getContext().LongTy), Size);
+ llvm::ConstantInt::get(Types.ConvertType(getContext().LongTy),
+ Size.getQuantity());
Args.push_back(std::make_pair(RValue::get(SizeVal),
getContext().LongTy));
llvm::Value *True =
OpenPOWER on IntegriCloud