From ed65ea2738ab511212c76c4bbb61a215a2cd6af3 Mon Sep 17 00:00:00 2001 From: Aaron Ballman Date: Thu, 6 Mar 2014 23:45:36 +0000 Subject: [C++11] Replacing iterators redecls_begin() and redecls_end() with iterator_range redecls(). Updating all of the usages of the iterators with range-based for loops, which allows the begin/end forms to be removed entirely. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@203179 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/CodeGenFunction.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'lib/CodeGen/CodeGenFunction.cpp') diff --git a/lib/CodeGen/CodeGenFunction.cpp b/lib/CodeGen/CodeGenFunction.cpp index 975ae6cb46..d35ab739e6 100644 --- a/lib/CodeGen/CodeGenFunction.cpp +++ b/lib/CodeGen/CodeGenFunction.cpp @@ -521,8 +521,7 @@ void CodeGenFunction::StartFunction(GlobalDecl GD, // attribute to all function that are not marked AlwaysInline. if (const FunctionDecl *FD = dyn_cast_or_null(D)) { if (!CGM.getCodeGenOpts().NoInline) { - for (FunctionDecl::redecl_iterator RI = FD->redecls_begin(), - RE = FD->redecls_end(); RI != RE; ++RI) + for (auto RI : FD->redecls()) if (RI->isInlineSpecified()) { Fn->addFnAttr(llvm::Attribute::InlineHint); break; -- cgit v1.2.3