summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGObjCGNU.cpp
diff options
context:
space:
mode:
authorAaron Ballman <aaron@aaronballman.com>2014-03-13 22:58:06 +0000
committerAaron Ballman <aaron@aaronballman.com>2014-03-13 22:58:06 +0000
commit0f6e64d50511aeab55ed6929d8bc1953b776bb92 (patch)
tree809e302691a93f939b33e1eff7ccd8925c8a84d7 /clang/lib/CodeGen/CGObjCGNU.cpp
parent9b8f9c3d95c40bbe4e575929d97ad8b3cce7244e (diff)
downloadbcm5719-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.cpp5
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;
OpenPOWER on IntegriCloud