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 | 581deb3da481053c4993c7600f97acf7768caac5 (patch) | |
tree | 9c3cfe3a1f156e2ac3d7edc4d1a5fdaed4589c1a /lib/CodeGen/TargetInfo.cpp | |
parent | 1ada2a65833266c139010bedfad87e58e5a7d74d (diff) |
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158104 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/TargetInfo.cpp')
-rw-r--r-- | lib/CodeGen/TargetInfo.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/CodeGen/TargetInfo.cpp b/lib/CodeGen/TargetInfo.cpp index 34c7b428ed..e3d19dbf38 100644 --- a/lib/CodeGen/TargetInfo.cpp +++ b/lib/CodeGen/TargetInfo.cpp @@ -161,7 +161,7 @@ static bool isEmptyRecord(ASTContext &Context, QualType T, bool AllowArrays) { for (RecordDecl::field_iterator i = RD->field_begin(), e = RD->field_end(); i != e; ++i) - if (!isEmptyField(Context, &*i, AllowArrays)) + if (!isEmptyField(Context, *i, AllowArrays)) return false; return true; } @@ -229,7 +229,7 @@ static const Type *isSingleElementStruct(QualType T, ASTContext &Context) { // Check for single element. for (RecordDecl::field_iterator i = RD->field_begin(), e = RD->field_end(); i != e; ++i) { - const FieldDecl *FD = &*i; + const FieldDecl *FD = *i; QualType FT = FD->getType(); // Ignore empty fields. @@ -301,7 +301,7 @@ static bool canExpandIndirectArgument(QualType Ty, ASTContext &Context) { for (RecordDecl::field_iterator i = RD->field_begin(), e = RD->field_end(); i != e; ++i) { - const FieldDecl *FD = &*i; + const FieldDecl *FD = *i; if (!is32Or64BitBasicType(FD->getType(), Context)) return false; @@ -534,7 +534,7 @@ bool X86_32ABIInfo::shouldReturnTypeInRegister(QualType Ty, // passed in a register. for (RecordDecl::field_iterator i = RT->getDecl()->field_begin(), e = RT->getDecl()->field_end(); i != e; ++i) { - const FieldDecl *FD = &*i; + const FieldDecl *FD = *i; // Empty fields are ignored. if (isEmptyField(Context, FD, true)) @@ -2603,7 +2603,7 @@ static bool isHomogeneousAggregate(QualType Ty, const Type *&Base, Members = 0; for (RecordDecl::field_iterator i = RD->field_begin(), e = RD->field_end(); i != e; ++i) { - const FieldDecl *FD = &*i; + const FieldDecl *FD = *i; uint64_t FldMembers; if (!isHomogeneousAggregate(FD->getType(), Base, Context, &FldMembers)) return false; @@ -2746,7 +2746,7 @@ static bool isIntegerLikeType(QualType Ty, ASTContext &Context, unsigned idx = 0; for (RecordDecl::field_iterator i = RD->field_begin(), e = RD->field_end(); i != e; ++i, ++idx) { - const FieldDecl *FD = &*i; + const FieldDecl *FD = *i; // Bit-fields are not addressable, we only need to verify they are "integer // like". We still have to disallow a subsequent non-bitfield, for example: |