From: Eric Christopher Date: Fri, 4 Jan 2013 17:59:07 +0000 (+0000) Subject: Fix fieldNo usage for lambdas. No behavior change since the X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=fd5ac0d75abd6ead8dd39bf526b34eeaff81cef6;p=clang Fix fieldNo usage for lambdas. No behavior change since the field number was 0 anyhow. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171472 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/CGDebugInfo.cpp b/lib/CodeGen/CGDebugInfo.cpp index 2328119b8e..f14834f03a 100644 --- a/lib/CodeGen/CGDebugInfo.cpp +++ b/lib/CodeGen/CGDebugInfo.cpp @@ -813,7 +813,6 @@ void CGDebugInfo:: CollectRecordFields(const RecordDecl *record, llvm::DIFile tunit, SmallVectorImpl &elements, llvm::DIType RecordTy) { - unsigned fieldNo = 0; const ASTRecordLayout &layout = CGM.getContext().getASTRecordLayout(record); const CXXRecordDecl *CXXDecl = dyn_cast(record); @@ -851,12 +850,13 @@ CollectRecordFields(const RecordDecl *record, llvm::DIFile tunit, QualType type = f->getType(); llvm::DIType fieldType = createFieldType("this", type, 0, f->getLocation(), f->getAccess(), - layout.getFieldOffset(fieldNo), VUnit, RecordTy); + layout.getFieldOffset(fieldno), VUnit, RecordTy); elements.push_back(fieldType); } } } else { + unsigned fieldNo = 0; bool IsMsStruct = record->isMsStruct(CGM.getContext()); const FieldDecl *LastFD = 0; for (RecordDecl::field_iterator I = record->field_begin(),