diff options
author | David Blaikie <dblaikie@gmail.com> | 2012-06-06 20:45:41 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2012-06-06 20:45:41 +0000 |
commit | 40ed29730b2656796cd6085148f7aef1886040cf (patch) | |
tree | 939094a1639d8564f8e5044bef548315b588ff32 /clang/lib/CodeGen/CGCall.cpp | |
parent | 3f87e3b7073a954b9f1a600e0cf8149e1e043134 (diff) | |
download | bcm5719-llvm-40ed29730b2656796cd6085148f7aef1886040cf.tar.gz bcm5719-llvm-40ed29730b2656796cd6085148f7aef1886040cf.zip |
Revert Decl's iterators back to pointer value_type rather than reference value_type
In addition, I've made the pointer and reference typedef 'void' rather than T*
just so they can't get misused. I would've omitted them entirely but
std::distance likes them to be there even if it doesn't use them.
This rolls back r155808 and r155869.
Review by Doug Gregor incorporating feedback from Chandler Carruth.
llvm-svn: 158104
Diffstat (limited to 'clang/lib/CodeGen/CGCall.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGCall.cpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/clang/lib/CodeGen/CGCall.cpp b/clang/lib/CodeGen/CGCall.cpp index 4a8efe17384..c1106c52d4b 100644 --- a/clang/lib/CodeGen/CGCall.cpp +++ b/clang/lib/CodeGen/CGCall.cpp @@ -431,7 +431,7 @@ void CodeGenTypes::GetExpandedTypes(QualType type, for (RecordDecl::field_iterator i = RD->field_begin(), e = RD->field_end(); i != e; ++i) { - const FieldDecl *FD = &*i; + const FieldDecl *FD = *i; assert(!FD->isBitField() && "Cannot expand structure with bit-field members."); CharUnits FieldSize = getContext().getTypeSizeInChars(FD->getType()); @@ -445,10 +445,9 @@ void CodeGenTypes::GetExpandedTypes(QualType type, } else { for (RecordDecl::field_iterator i = RD->field_begin(), e = RD->field_end(); i != e; ++i) { - const FieldDecl &FD = *i; - assert(!FD.isBitField() && + assert(!i->isBitField() && "Cannot expand structure with bit-field members."); - GetExpandedTypes(FD.getType(), expandedTypes); + GetExpandedTypes(i->getType(), expandedTypes); } } } else if (const ComplexType *CT = type->getAs<ComplexType>()) { @@ -483,7 +482,7 @@ CodeGenFunction::ExpandTypeFromArgs(QualType Ty, LValue LV, for (RecordDecl::field_iterator i = RD->field_begin(), e = RD->field_end(); i != e; ++i) { - const FieldDecl *FD = &*i; + const FieldDecl *FD = *i; assert(!FD->isBitField() && "Cannot expand structure with bit-field members."); CharUnits FieldSize = getContext().getTypeSizeInChars(FD->getType()); @@ -500,7 +499,7 @@ CodeGenFunction::ExpandTypeFromArgs(QualType Ty, LValue LV, } else { for (RecordDecl::field_iterator i = RD->field_begin(), e = RD->field_end(); i != e; ++i) { - FieldDecl *FD = &*i; + FieldDecl *FD = *i; QualType FT = FD->getType(); // FIXME: What are the right qualifiers here? @@ -1815,7 +1814,7 @@ void CodeGenFunction::ExpandTypeToArgs(QualType Ty, RValue RV, for (RecordDecl::field_iterator i = RD->field_begin(), e = RD->field_end(); i != e; ++i) { - const FieldDecl *FD = &*i; + const FieldDecl *FD = *i; assert(!FD->isBitField() && "Cannot expand structure with bit-field members."); CharUnits FieldSize = getContext().getTypeSizeInChars(FD->getType()); @@ -1831,7 +1830,7 @@ void CodeGenFunction::ExpandTypeToArgs(QualType Ty, RValue RV, } else { for (RecordDecl::field_iterator i = RD->field_begin(), e = RD->field_end(); i != e; ++i) { - FieldDecl *FD = &*i; + FieldDecl *FD = *i; RValue FldRV = EmitRValueForField(LV, FD); ExpandTypeToArgs(FD->getType(), FldRV, Args, IRFuncTy); |