diff options
author | Douglas Gregor <dgregor@apple.com> | 2008-12-11 17:59:21 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2008-12-11 17:59:21 +0000 |
commit | a4c46df1cd63e06af2a094b68b902a3eb232f056 (patch) | |
tree | b0c6c3d274cafaa2dcb3476334afac668190b3ae /lib/CodeGen/CGDebugInfo.cpp | |
parent | 44b4321feab46299d3f5cfd404680884752a0fcf (diff) |
Actually distinguish between RecordDecl::field_iterator and RecordDecl::field_const_iterator, propagating the constness down to the FieldDecls.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60883 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGDebugInfo.cpp')
-rw-r--r-- | lib/CodeGen/CGDebugInfo.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/CodeGen/CGDebugInfo.cpp b/lib/CodeGen/CGDebugInfo.cpp index 67c60aae07..d6a1c6b8b3 100644 --- a/lib/CodeGen/CGDebugInfo.cpp +++ b/lib/CodeGen/CGDebugInfo.cpp @@ -191,7 +191,7 @@ llvm::DIType CGDebugInfo::CreateType(const FunctionType *Ty, /// getOrCreateRecordType - get structure or union type. llvm::DIType CGDebugInfo::CreateType(const RecordType *Ty, llvm::DICompileUnit Unit) { - const RecordDecl *Decl = Ty->getDecl(); + RecordDecl *Decl = Ty->getDecl(); unsigned Tag; if (Decl->isStruct()) @@ -236,8 +236,9 @@ llvm::DIType CGDebugInfo::CreateType(const RecordType *Ty, const ASTRecordLayout &RL = M->getContext().getASTRecordLayout(Decl); unsigned FieldNo = 0; - for (RecordDecl::field_const_iterator I = Decl->field_begin(), - E = Decl->field_end(); I != E; ++I, ++FieldNo) { + for (RecordDecl::field_iterator I = Decl->field_begin(), + E = Decl->field_end(); + I != E; ++I, ++FieldNo) { FieldDecl *Field = *I; llvm::DIType FieldTy = getOrCreateType(Field->getType(), Unit); |