diff options
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r-- | clang/lib/CodeGen/CodeGenModule.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index f4b47ec579d..98588a4122e 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/lib/CodeGen/CodeGenModule.cpp @@ -2851,10 +2851,8 @@ void CodeGenModule::EmitLinkageSpec(const LinkageSpecDecl *LSD) { // Meta-data for ObjC class includes references to implemented methods. // Generate class's method definitions first. if (auto *OID = dyn_cast<ObjCImplDecl>(I)) { - for (ObjCContainerDecl::method_iterator M = OID->meth_begin(), - MEnd = OID->meth_end(); - M != MEnd; ++M) - EmitTopLevelDecl(*M); + for (auto *M : OID->methods()) + EmitTopLevelDecl(M); } EmitTopLevelDecl(I); } |