aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGObjCGNU.cpp
diff options
context:
space:
mode:
authorKen Dyck <kd@kendyck.com>2011-02-09 01:59:34 +0000
committerKen Dyck <kd@kendyck.com>2011-02-09 01:59:34 +0000
commit5f022d82696c84e4d127c558871d68ac6273274e (patch)
tree1116084da52ffdcc50f243868be92d98053494c1 /lib/CodeGen/CGObjCGNU.cpp
parentd767d81290288c030f3be0be1d3e62b9c8df51dc (diff)
Convert RecordLayout::Size to CharUnits from bits. No changes to
functionality intended. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125156 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGObjCGNU.cpp')
-rw-r--r--lib/CodeGen/CGObjCGNU.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/CodeGen/CGObjCGNU.cpp b/lib/CodeGen/CGObjCGNU.cpp
index 4f65dddfdd..d481e77926 100644
--- a/lib/CodeGen/CGObjCGNU.cpp
+++ b/lib/CodeGen/CGObjCGNU.cpp
@@ -1437,7 +1437,8 @@ void CGObjCGNU::GenerateClass(const ObjCImplementationDecl *OID) {
}
// Get the size of instances.
- int instanceSize = Context.getASTObjCImplementationLayout(OID).getSize() / 8;
+ int instanceSize =
+ Context.getASTObjCImplementationLayout(OID).getSize().getQuantity();
// Collect information about instance variables.
llvm::SmallVector<llvm::Constant*, 16> IvarNames;
@@ -1447,7 +1448,7 @@ void CGObjCGNU::GenerateClass(const ObjCImplementationDecl *OID) {
std::vector<llvm::Constant*> IvarOffsetValues;
int superInstanceSize = !SuperClassDecl ? 0 :
- Context.getASTObjCInterfaceLayout(SuperClassDecl).getSize() / 8;
+ Context.getASTObjCInterfaceLayout(SuperClassDecl).getSize().getQuantity();
// For non-fragile ivars, set the instance size to 0 - {the size of just this
// class}. The runtime will then set this to the correct value on load.
if (CGM.getContext().getLangOptions().ObjCNonFragileABI) {