aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-09-11 20:56:53 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-09-11 20:56:53 +0000
commit389a0e8b6568932780dfd500790494e5fb598058 (patch)
treed5fc29706543db7fd2f05f8d58ddf6bd87553442
parent678119abd43401c8dc5480f8315b37fa093a4d21 (diff)
Fix use of uninitialized, David please check.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81570 91177308-0d34-0410-b5e6-96231b3b80d8
-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 8617b516f5..dacc888303 100644
--- a/lib/CodeGen/CGObjCGNU.cpp
+++ b/lib/CodeGen/CGObjCGNU.cpp
@@ -1184,7 +1184,7 @@ void CGObjCGNU::GenerateClass(const ObjCImplementationDecl *OID) {
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;