summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGDebugInfo.cpp
diff options
context:
space:
mode:
authorEric Christopher <echristo@gmail.com>2013-01-04 17:59:07 +0000
committerEric Christopher <echristo@gmail.com>2013-01-04 17:59:07 +0000
commit0f75943780b2ff116eadb9e629cef3dc75f81c9c (patch)
tree3f4aa0bbf2a6389dc012e3146b97290778e2b3ed /clang/lib/CodeGen/CGDebugInfo.cpp
parentbe6570d42995b6889330e5cfc67d787447fd011a (diff)
downloadbcm5719-llvm-0f75943780b2ff116eadb9e629cef3dc75f81c9c.tar.gz
bcm5719-llvm-0f75943780b2ff116eadb9e629cef3dc75f81c9c.zip
Fix fieldNo usage for lambdas. No behavior change since the
field number was 0 anyhow. llvm-svn: 171472
Diffstat (limited to 'clang/lib/CodeGen/CGDebugInfo.cpp')
-rw-r--r--clang/lib/CodeGen/CGDebugInfo.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp
index 2328119b8e8..f14834f03a1 100644
--- a/clang/lib/CodeGen/CGDebugInfo.cpp
+++ b/clang/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(),
OpenPOWER on IntegriCloud