diff options
author | Ken Dyck <kd@kendyck.com> | 2011-02-09 01:59:34 +0000 |
---|---|---|
committer | Ken Dyck <kd@kendyck.com> | 2011-02-09 01:59:34 +0000 |
commit | c8ae55050dcf5becdb8a80b065ecabdd6ae59744 (patch) | |
tree | 3d5fbba9084d1cd9f495b922bad5b00f86daaadf /clang/lib/CodeGen/CGObjCMac.cpp | |
parent | a40f8ebc83735aa7f930d0772817725e958bfbd6 (diff) | |
download | bcm5719-llvm-c8ae55050dcf5becdb8a80b065ecabdd6ae59744.tar.gz bcm5719-llvm-c8ae55050dcf5becdb8a80b065ecabdd6ae59744.zip |
Convert RecordLayout::Size to CharUnits from bits. No changes to
functionality intended.
llvm-svn: 125156
Diffstat (limited to 'clang/lib/CodeGen/CGObjCMac.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGObjCMac.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CGObjCMac.cpp b/clang/lib/CodeGen/CGObjCMac.cpp index be7c79cbb56..3cbb296b0b2 100644 --- a/clang/lib/CodeGen/CGObjCMac.cpp +++ b/clang/lib/CodeGen/CGObjCMac.cpp @@ -131,7 +131,8 @@ LValue CGObjCRuntime::EmitValueForIvarAtOffset(CodeGen::CodeGenFunction &CGF, // a synthesized ivar can never be a bit-field, so this is safe. const ASTRecordLayout &RL = CGF.CGM.getContext().getASTObjCInterfaceLayout(OID); - uint64_t TypeSizeInBits = RL.getSize(); + uint64_t TypeSizeInBits = + RL.getSize().getQuantity() * CGF.CGM.getContext().getCharWidth(); uint64_t FieldBitOffset = LookupFieldBitOffset(CGF.CGM, OID, 0, Ivar); uint64_t BitOffset = FieldBitOffset % 8; uint64_t ContainingTypeAlign = 8; @@ -2214,7 +2215,7 @@ void CGObjCMac::GenerateClass(const ObjCImplementationDecl *ID) { if (ID->getNumIvarInitializers()) Flags |= eClassFlags_HasCXXStructors; unsigned Size = - CGM.getContext().getASTObjCImplementationLayout(ID).getSize() / 8; + CGM.getContext().getASTObjCImplementationLayout(ID).getSize().getQuantity(); // FIXME: Set CXX-structors flag. if (ID->getClassInterface()->getVisibility() == HiddenVisibility) |