diff options
author | Aaron Ballman <aaron@aaronballman.com> | 2014-03-13 17:35:02 +0000 |
---|---|---|
committer | Aaron Ballman <aaron@aaronballman.com> | 2014-03-13 17:35:02 +0000 |
commit | 9bc5f36099eb163fbd459fe3b0b8e761e0ec9d32 (patch) | |
tree | 88e651364cc4e46db09b69b53d9a99e9a962fdc8 /clang/lib/CodeGen/CGObjC.cpp | |
parent | 0ad78303decbdce1c35a7082de91ec6263f970be (diff) | |
download | bcm5719-llvm-9bc5f36099eb163fbd459fe3b0b8e761e0ec9d32.tar.gz bcm5719-llvm-9bc5f36099eb163fbd459fe3b0b8e761e0ec9d32.zip |
[C++11] Replacing ObjCImplementationDecl iterators init_begin() and init_end() with iterator_range inits(). Updating all of the usages of the iterators with range-based for loops.
llvm-svn: 203820
Diffstat (limited to 'clang/lib/CodeGen/CGObjC.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGObjC.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/clang/lib/CodeGen/CGObjC.cpp b/clang/lib/CodeGen/CGObjC.cpp index 5cc2ff3173f..01ad1f22a2b 100644 --- a/clang/lib/CodeGen/CGObjC.cpp +++ b/clang/lib/CodeGen/CGObjC.cpp @@ -1362,11 +1362,9 @@ void CodeGenFunction::GenerateObjCCtorDtorMethod(ObjCImplementationDecl *IMP, // Suppress the final autorelease in ARC. AutoreleaseResult = false; - for (ObjCImplementationDecl::init_const_iterator B = IMP->init_begin(), - E = IMP->init_end(); B != E; ++B) { - CXXCtorInitializer *IvarInit = (*B); + for (const auto *IvarInit : IMP->inits()) { FieldDecl *Field = IvarInit->getAnyMember(); - ObjCIvarDecl *Ivar = cast<ObjCIvarDecl>(Field); + ObjCIvarDecl *Ivar = cast<ObjCIvarDecl>(Field); LValue LV = EmitLValueForIvar(TypeOfSelfObject(), LoadObjCSelf(), Ivar, 0); EmitAggExpr(IvarInit->getInit(), |