diff options
author | Aaron Ballman <aaron@aaronballman.com> | 2014-03-08 20:12:42 +0000 |
---|---|---|
committer | Aaron Ballman <aaron@aaronballman.com> | 2014-03-08 20:12:42 +0000 |
commit | 8328f6462b3e0b8d77a2da5cfbdf1885950e5fc8 (patch) | |
tree | 4f04e9f1980f32d611aa295339a054b06e255cd4 /lib/CodeGen/CGDebugInfo.cpp | |
parent | 0ce08a07392951d4c05c8d754317cfd3105760d0 (diff) | |
download | clang-8328f6462b3e0b8d77a2da5cfbdf1885950e5fc8.tar.gz clang-8328f6462b3e0b8d77a2da5cfbdf1885950e5fc8.tar.bz2 clang-8328f6462b3e0b8d77a2da5cfbdf1885950e5fc8.tar.xz |
[C++11] Replacing RecordDecl iterators field_begin() and field_end() with iterator_range fields(). Updating all of the usages of the iterators with range-based for loops.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@203355 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGDebugInfo.cpp')
-rw-r--r-- | lib/CodeGen/CGDebugInfo.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/CodeGen/CGDebugInfo.cpp b/lib/CodeGen/CGDebugInfo.cpp index 4e7e223ca0..97c947097a 100644 --- a/lib/CodeGen/CGDebugInfo.cpp +++ b/lib/CodeGen/CGDebugInfo.cpp @@ -2837,10 +2837,7 @@ void CGDebugInfo::EmitDeclare(const VarDecl *VD, unsigned Tag, // all union fields. const RecordDecl *RD = cast<RecordDecl>(RT->getDecl()); if (RD->isUnion() && RD->isAnonymousStructOrUnion()) { - for (RecordDecl::field_iterator I = RD->field_begin(), - E = RD->field_end(); - I != E; ++I) { - FieldDecl *Field = *I; + for (const auto *Field : RD->fields()) { llvm::DIType FieldTy = getOrCreateType(Field->getType(), Unit); StringRef FieldName = Field->getName(); |