diff options
author | Aaron Ballman <aaron@aaronballman.com> | 2014-03-13 20:29:09 +0000 |
---|---|---|
committer | Aaron Ballman <aaron@aaronballman.com> | 2014-03-13 20:29:09 +0000 |
commit | a49c5064a186c5cfec789fa29c9d502b93541dd6 (patch) | |
tree | 76b9fb4a6f1602bcf76ea4ca8485fbd7ee96ed8e /clang/lib/CodeGen/CGObjCGNU.cpp | |
parent | a8fb72428b22f694acdf1b2203c4fc2d70f74456 (diff) | |
download | bcm5719-llvm-a49c5064a186c5cfec789fa29c9d502b93541dd6.tar.gz bcm5719-llvm-a49c5064a186c5cfec789fa29c9d502b93541dd6.zip |
[C++11] Replacing ObjCInterfaceDecl iterators protocol_begin() and protocol_end() with iterator_range protocols(). Updating all of the usages of the iterators with range-based for loops.
Drive-by fixing some incorrect types where a for loop would be improperly using ObjCInterfaceDecl::protocol_iterator. No functional changes in these cases.
llvm-svn: 203842
Diffstat (limited to 'clang/lib/CodeGen/CGObjCGNU.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGObjCGNU.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/clang/lib/CodeGen/CGObjCGNU.cpp b/clang/lib/CodeGen/CGObjCGNU.cpp index d64d00a153c..9a5ccfa646c 100644 --- a/clang/lib/CodeGen/CGObjCGNU.cpp +++ b/clang/lib/CodeGen/CGObjCGNU.cpp @@ -2252,12 +2252,8 @@ void CGObjCGNU::GenerateClass(const ObjCImplementationDecl *OID) { } // Collect the names of referenced protocols SmallVector<std::string, 16> Protocols; - for (ObjCInterfaceDecl::protocol_iterator - I = ClassDecl->protocol_begin(), - E = ClassDecl->protocol_end(); I != E; ++I) - Protocols.push_back((*I)->getNameAsString()); - - + for (const auto *I : ClassDecl->protocols()) + Protocols.push_back(I->getNameAsString()); // Get the superclass pointer. llvm::Constant *SuperClass; |