From: Fariborz Jahanian Date: Mon, 11 Oct 2010 23:55:47 +0000 (+0000) Subject: Fixes a typo which caused byte offset in debug info X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=fe8fdba52d89ea72aba6efbb6346394277224db4;p=clang Fixes a typo which caused byte offset in debug info for ivars to be 0. Fixes pr8353. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116273 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/CGDebugInfo.cpp b/lib/CodeGen/CGDebugInfo.cpp index f3a3420c5a..a07b43a0b5 100644 --- a/lib/CodeGen/CGDebugInfo.cpp +++ b/lib/CodeGen/CGDebugInfo.cpp @@ -1125,7 +1125,7 @@ llvm::DIType CGDebugInfo::CreateType(const ObjCInterfaceType *Ty, unsigned FieldNo = 0; for (ObjCIvarDecl *Field = ID->all_declared_ivar_begin(); Field; - Field = Field->getNextIvar()) { + Field = Field->getNextIvar(), ++FieldNo) { llvm::DIType FieldTy = getOrCreateType(Field->getType(), Unit); llvm::StringRef FieldName = Field->getName();