diff options
author | Aaron Ballman <aaron@aaronballman.com> | 2014-03-13 22:58:06 +0000 |
---|---|---|
committer | Aaron Ballman <aaron@aaronballman.com> | 2014-03-13 22:58:06 +0000 |
commit | 0f6e64d50511aeab55ed6929d8bc1953b776bb92 (patch) | |
tree | 809e302691a93f939b33e1eff7ccd8925c8a84d7 /clang/lib/CodeGen/CGObjCGNU.cpp | |
parent | 9b8f9c3d95c40bbe4e575929d97ad8b3cce7244e (diff) | |
download | bcm5719-llvm-0f6e64d50511aeab55ed6929d8bc1953b776bb92.tar.gz bcm5719-llvm-0f6e64d50511aeab55ed6929d8bc1953b776bb92.zip |
[C++11] Replacing ObjCProtocolDecl iterators protocol_begin() and protocol_end() with iterator_range protocols(). Updating all of the usages of the iterators with range-based for loops.
llvm-svn: 203863
Diffstat (limited to 'clang/lib/CodeGen/CGObjCGNU.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGObjCGNU.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/clang/lib/CodeGen/CGObjCGNU.cpp b/clang/lib/CodeGen/CGObjCGNU.cpp index 9a5ccfa646c..7a5344bd298 100644 --- a/clang/lib/CodeGen/CGObjCGNU.cpp +++ b/clang/lib/CodeGen/CGObjCGNU.cpp @@ -1755,9 +1755,8 @@ void CGObjCGNU::GenerateProtocol(const ObjCProtocolDecl *PD) { PD = Def; SmallVector<std::string, 16> Protocols; - for (ObjCProtocolDecl::protocol_iterator PI = PD->protocol_begin(), - E = PD->protocol_end(); PI != E; ++PI) - Protocols.push_back((*PI)->getNameAsString()); + for (const auto *PI : PD->protocols()) + Protocols.push_back(PI->getNameAsString()); SmallVector<llvm::Constant*, 16> InstanceMethodNames; SmallVector<llvm::Constant*, 16> InstanceMethodTypes; SmallVector<llvm::Constant*, 16> OptionalInstanceMethodNames; |