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

Daniel Dunbar daniel at zuster.org
Fri Sep 11 13:56:53 PDT 2009


Author: ddunbar
Date: Fri Sep 11 15:56:53 2009
New Revision: 81570

URL: http://llvm.org/viewvc/llvm-project?rev=81570&view=rev
Log:
Fix use of uninitialized, David please check.

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=81570&r1=81569&r2=81570&view=diff

==============================================================================
--- cfe/trunk/lib/CodeGen/CGObjCGNU.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGObjCGNU.cpp Fri Sep 11 15:56:53 2009
@@ -1184,7 +1184,7 @@
       Context.getObjCEncodingForType((*iter)->getType(), TypeStr);
       IvarTypes.push_back(MakeConstantString(TypeStr));
       // Get the offset
-      uint64_t Offset;
+      uint64_t Offset = 0;
       uint64_t BaseOffset = ComputeIvarBaseOffset(CGM, ClassDecl, *iter);
       if (CGM.getContext().getLangOptions().ObjCNonFragileABI) {
         Offset = BaseOffset - superInstanceSize;





More information about the cfe-commits mailing list