summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKen Dyck <kd@kendyck.com>2011-04-14 00:43:09 +0000
committerKen Dyck <kd@kendyck.com>2011-04-14 00:43:09 +0000
commitc5ca87675ecd829ff7c6f5cf952f79d0fbde435d (patch)
tree967b9ede3e41e925bdd4ae93c40fdec1b9d2beea
parentd162fb83f2c005484beb8ad71860c30a09f1907d (diff)
downloadbcm5719-llvm-c5ca87675ecd829ff7c6f5cf952f79d0fbde435d.tar.gz
bcm5719-llvm-c5ca87675ecd829ff7c6f5cf952f79d0fbde435d.zip
Replace a couple of divisions-by-'8' with divisions-by-charwidth. No change
in functionality intended. llvm-svn: 129491
-rw-r--r--clang/lib/CodeGen/CGObjCMac.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CGObjCMac.cpp b/clang/lib/CodeGen/CGObjCMac.cpp
index bd80caff869..e8b6f7f5433 100644
--- a/clang/lib/CodeGen/CGObjCMac.cpp
+++ b/clang/lib/CodeGen/CGObjCMac.cpp
@@ -3562,7 +3562,7 @@ void CGObjCCommonMac::BuildAggrIvarLayout(const ObjCImplementationDecl *OI,
// Note that 'i' here is actually the field index inside RD of Field,
// although this dependency is hidden.
const ASTRecordLayout &RL = CGM.getContext().getASTRecordLayout(RD);
- FieldOffset = RL.getFieldOffset(i) / 8;
+ FieldOffset = RL.getFieldOffset(i) / ByteSizeInBits;
} else
FieldOffset = ComputeIvarBaseOffset(CGM, OI, cast<ObjCIvarDecl>(Field));
@@ -4868,7 +4868,7 @@ void CGObjCNonFragileABIMac::GetClassSizeInfo(const ObjCImplementationDecl *OID,
if (!RL.getFieldCount())
InstanceStart = InstanceSize;
else
- InstanceStart = RL.getFieldOffset(0) / 8;
+ InstanceStart = RL.getFieldOffset(0) / CGM.getContext().getCharWidth();
}
void CGObjCNonFragileABIMac::GenerateClass(const ObjCImplementationDecl *ID) {
OpenPOWER on IntegriCloud