summaryrefslogtreecommitdiff
path: root/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorAaron Ballman <aaron@aaronballman.com>2014-03-10 17:08:28 +0000
committerAaron Ballman <aaron@aaronballman.com>2014-03-10 17:08:28 +0000
commit15fd658d179dfa842e067e34d4442ead6b1e85e4 (patch)
tree8dbb032dc38fbaade3ad3a745ca27eef0fc7563a /lib/CodeGen/CodeGenModule.cpp
parent9c7670dee4c71de3076ccdfbe1f40a891e9d1525 (diff)
downloadclang-15fd658d179dfa842e067e34d4442ead6b1e85e4.tar.gz
clang-15fd658d179dfa842e067e34d4442ead6b1e85e4.tar.bz2
clang-15fd658d179dfa842e067e34d4442ead6b1e85e4.tar.xz
[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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@203474 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenModule.cpp')
-rw-r--r--lib/CodeGen/CodeGenModule.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/CodeGen/CodeGenModule.cpp b/lib/CodeGen/CodeGenModule.cpp
index c8dd8136fd..4f040e2780 100644
--- a/lib/CodeGen/CodeGenModule.cpp
+++ b/lib/CodeGen/CodeGenModule.cpp
@@ -1051,10 +1051,8 @@ void CodeGenModule::AddGlobalAnnotations(const ValueDecl *D,
llvm::GlobalValue *GV) {
assert(D->hasAttr<AnnotateAttr>() && "no annotate attribute");
// Get the struct elements for these annotations.
- for (specific_attr_iterator<AnnotateAttr>
- ai = D->specific_attr_begin<AnnotateAttr>(),
- ae = D->specific_attr_end<AnnotateAttr>(); ai != ae; ++ai)
- Annotations.push_back(EmitAnnotateAttr(GV, *ai, D->getLocation()));
+ for (const auto *I : D->specific_attrs<AnnotateAttr>())
+ Annotations.push_back(EmitAnnotateAttr(GV, I, D->getLocation()));
}
bool CodeGenModule::MayDeferGeneration(const ValueDecl *Global) {