From a9f49e394c8e25c1f6e0693e52a770125f01d7e1 Mon Sep 17 00:00:00 2001 From: Aaron Ballman Date: Thu, 13 Mar 2014 20:55:22 +0000 Subject: [C++11] Replacing ObjCInterfaceDecl iterators all_referenced_protocol_begin() and all_referenced_protocol_end() with iterator_range all_referenced_protocols(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 203848 --- clang/lib/CodeGen/CGObjCMac.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'clang/lib/CodeGen/CGObjCMac.cpp') diff --git a/clang/lib/CodeGen/CGObjCMac.cpp b/clang/lib/CodeGen/CGObjCMac.cpp index 98bdb16889d..e62eddd695a 100644 --- a/clang/lib/CodeGen/CGObjCMac.cpp +++ b/clang/lib/CodeGen/CGObjCMac.cpp @@ -2813,11 +2813,8 @@ llvm::Constant *CGObjCCommonMac::EmitPropertyList(Twine Name, Prop)); } if (const ObjCInterfaceDecl *OID = dyn_cast(OCD)) { - for (ObjCInterfaceDecl::all_protocol_iterator - P = OID->all_referenced_protocol_begin(), - E = OID->all_referenced_protocol_end(); P != E; ++P) - PushProtocolProperties(PropertySet, Properties, Container, (*P), - ObjCTypes); + for (const auto *P : OID->all_referenced_protocols()) + PushProtocolProperties(PropertySet, Properties, Container, P, ObjCTypes); } else if (const ObjCCategoryDecl *CD = dyn_cast(OCD)) { for (ObjCCategoryDecl::protocol_iterator P = CD->protocol_begin(), -- cgit v1.2.3