diff options
author | Eric Christopher <echristo@gmail.com> | 2013-01-04 17:59:07 +0000 |
---|---|---|
committer | Eric Christopher <echristo@gmail.com> | 2013-01-04 17:59:07 +0000 |
commit | fd5ac0d75abd6ead8dd39bf526b34eeaff81cef6 (patch) | |
tree | cf5820a5e2dfface27ceeac9cf3c12428b9edd2e /lib/CodeGen/CGDebugInfo.cpp | |
parent | 6769ccb6853871c085c8366ab5e993841ad56d00 (diff) |
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
Diffstat (limited to 'lib/CodeGen/CGDebugInfo.cpp')
-rw-r--r-- | lib/CodeGen/CGDebugInfo.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
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<llvm::Value *> &elements, llvm::DIType RecordTy) { - unsigned fieldNo = 0; const ASTRecordLayout &layout = CGM.getContext().getASTRecordLayout(record); const CXXRecordDecl *CXXDecl = dyn_cast<CXXRecordDecl>(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(), |