[cfe-commits] r89133 - /cfe/trunk/lib/CodeGen/CGObjCGNU.cpp

David Chisnall csdavec at swan.ac.uk
Tue Nov 17 11:32:15 PST 2009


Author: theraven
Date: Tue Nov 17 13:32:15 2009
New Revision: 89133

URL: http://llvm.org/viewvc/llvm-project?rev=89133&view=rev
Log:
Fixed bug where ivar offsets were being initialized as 0 with the fragile GNU ABI.


Modified:
    cfe/trunk/lib/CodeGen/CGObjCGNU.cpp

Modified: cfe/trunk/lib/CodeGen/CGObjCGNU.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGObjCGNU.cpp?rev=89133&r1=89132&r2=89133&view=diff

==============================================================================
--- cfe/trunk/lib/CodeGen/CGObjCGNU.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGObjCGNU.cpp Tue Nov 17 13:32:15 2009
@@ -1191,8 +1191,8 @@
       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;
       }





More information about the cfe-commits mailing list