summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/ASTContext.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2008-12-11 17:59:21 +0000
committerDouglas Gregor <dgregor@apple.com>2008-12-11 17:59:21 +0000
commite029561346ed7b2f1f499c098e91b968f3d4d34f (patch)
treeb02e9ba1dffbcd5dbe0dd7fb033324c6e6b5ed2b /clang/lib/AST/ASTContext.cpp
parent6a344e097c4bcac20a75c53d77d8a6fbc6db6914 (diff)
downloadbcm5719-llvm-e029561346ed7b2f1f499c098e91b968f3d4d34f.tar.gz
bcm5719-llvm-e029561346ed7b2f1f499c098e91b968f3d4d34f.zip
Actually distinguish between RecordDecl::field_iterator and RecordDecl::field_const_iterator, propagating the constness down to the FieldDecls.
llvm-svn: 60883
Diffstat (limited to 'clang/lib/AST/ASTContext.cpp')
-rw-r--r--clang/lib/AST/ASTContext.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/AST/ASTContext.cpp b/clang/lib/AST/ASTContext.cpp
index 3455504fdb1..e62920f631f 100644
--- a/clang/lib/AST/ASTContext.cpp
+++ b/clang/lib/AST/ASTContext.cpp
@@ -553,8 +553,8 @@ const ASTRecordLayout &ASTContext::getASTRecordLayout(const RecordDecl *D) {
// Layout each field, for now, just sequentially, respecting alignment. In
// the future, this will need to be tweakable by targets.
unsigned FieldIdx = 0;
- for (RecordDecl::field_iterator Field = D->field_begin(),
- FieldEnd = D->field_end();
+ for (RecordDecl::field_const_iterator Field = D->field_begin(),
+ FieldEnd = D->field_end();
Field != FieldEnd; (void)++Field, ++FieldIdx)
NewEntry->LayoutField(*Field, FieldIdx, IsUnion, StructPacking, *this);
OpenPOWER on IntegriCloud