From be22bcb180714600926d5247ad9439f75cfc49db Mon Sep 17 00:00:00 2001 From: Aaron Ballman Date: Mon, 10 Mar 2014 17:08:28 +0000 Subject: [C++11] Replacing DeclBase iterators specific_attr_begin() and specific_attr_end() with iterator_range specific_attrs(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 203474 --- clang/lib/CodeGen/CodeGenModule.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'clang/lib/CodeGen/CodeGenModule.cpp') diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index c8dd813..4f040e2 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/lib/CodeGen/CodeGenModule.cpp @@ -1051,10 +1051,8 @@ void CodeGenModule::AddGlobalAnnotations(const ValueDecl *D, llvm::GlobalValue *GV) { assert(D->hasAttr() && "no annotate attribute"); // Get the struct elements for these annotations. - for (specific_attr_iterator - ai = D->specific_attr_begin(), - ae = D->specific_attr_end(); ai != ae; ++ai) - Annotations.push_back(EmitAnnotateAttr(GV, *ai, D->getLocation())); + for (const auto *I : D->specific_attrs()) + Annotations.push_back(EmitAnnotateAttr(GV, I, D->getLocation())); } bool CodeGenModule::MayDeferGeneration(const ValueDecl *Global) { -- cgit v1.1