aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGObjCGNU.cpp
diff options
context:
space:
mode:
authorDavid Chisnall <csdavec@swan.ac.uk>2009-11-17 19:32:15 +0000
committerDavid Chisnall <csdavec@swan.ac.uk>2009-11-17 19:32:15 +0000
commitaecbf24a6bad049437f8fec97e557d414003a3db (patch)
tree552bde692fffd14e1cf6a292d9e6ce3c60666c9f /lib/CodeGen/CGObjCGNU.cpp
parent0196ce4ff6a06b3b0dec1b326fadb9069ee68fcd (diff)
Fixed bug where ivar offsets were being initialized as 0 with the fragile GNU ABI.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89133 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGObjCGNU.cpp')
-rw-r--r--lib/CodeGen/CGObjCGNU.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/CodeGen/CGObjCGNU.cpp b/lib/CodeGen/CGObjCGNU.cpp
index a71cd83930..b431daa958 100644
--- a/lib/CodeGen/CGObjCGNU.cpp
+++ b/lib/CodeGen/CGObjCGNU.cpp
@@ -1191,8 +1191,8 @@ void CGObjCGNU::GenerateClass(const ObjCImplementationDecl *OID) {
Context.getObjCEncodingForType((*iter)->getType(), TypeStr);
IvarTypes.push_back(MakeConstantString(TypeStr));
// Get the offset
- uint64_t Offset = 0;
uint64_t BaseOffset = ComputeIvarBaseOffset(CGM, ClassDecl, *iter);
+ uint64_t Offset = BaseOffset;
if (CGM.getContext().getLangOptions().ObjCNonFragileABI) {
Offset = BaseOffset - superInstanceSize;
}