зеркало из https://github.com/microsoft/clang-1.git
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:
Родитель
0259c3a3df
Коммит
18052cd75e
|
@ -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();
|
||||||
|
|
Загрузка…
Ссылка в новой задаче