Replace some literal 8s with char width and char align. No change in

functionality intended.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129996 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Ken Dyck 2011-04-22 17:23:43 +00:00
Родитель 0259c3a3df
Коммит 18052cd75e
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -117,8 +117,8 @@ LValue CGObjCRuntime::EmitValueForIvarAtOffset(CodeGen::CodeGenFunction &CGF,
CGF.CGM.getContext().getASTObjCInterfaceLayout(OID); CGF.CGM.getContext().getASTObjCInterfaceLayout(OID);
uint64_t TypeSizeInBits = CGF.CGM.getContext().toBits(RL.getSize()); uint64_t TypeSizeInBits = CGF.CGM.getContext().toBits(RL.getSize());
uint64_t FieldBitOffset = LookupFieldBitOffset(CGF.CGM, OID, 0, Ivar); uint64_t FieldBitOffset = LookupFieldBitOffset(CGF.CGM, OID, 0, Ivar);
uint64_t BitOffset = FieldBitOffset % 8; uint64_t BitOffset = FieldBitOffset % CGF.CGM.getContext().getCharWidth();
uint64_t ContainingTypeAlign = 8; uint64_t ContainingTypeAlign = CGF.CGM.getContext().Target.getCharAlign();
uint64_t ContainingTypeSize = TypeSizeInBits - (FieldBitOffset - BitOffset); uint64_t ContainingTypeSize = TypeSizeInBits - (FieldBitOffset - BitOffset);
uint64_t BitFieldSize = uint64_t BitFieldSize =
Ivar->getBitWidth()->EvaluateAsInt(CGF.getContext()).getZExtValue(); Ivar->getBitWidth()->EvaluateAsInt(CGF.getContext()).getZExtValue();