[cfe-commits] r171472 - /cfe/trunk/lib/CodeGen/CGDebugInfo.cpp
Eric Christopher
echristo at gmail.com
Fri Jan 4 09:59:08 PST 2013
Author: echristo
Date: Fri Jan 4 11:59:07 2013
New Revision: 171472
URL: http://llvm.org/viewvc/llvm-project?rev=171472&view=rev
Log:
Fix fieldNo usage for lambdas. No behavior change since the
field number was 0 anyhow.
Modified:
cfe/trunk/lib/CodeGen/CGDebugInfo.cpp
Modified: cfe/trunk/lib/CodeGen/CGDebugInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGDebugInfo.cpp?rev=171472&r1=171471&r2=171472&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGDebugInfo.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGDebugInfo.cpp Fri Jan 4 11:59:07 2013
@@ -813,7 +813,6 @@
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 @@
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(),
More information about the cfe-commits
mailing list