diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2016-06-26 14:10:56 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2016-06-26 14:10:56 +0000 |
commit | af28e7d6fa1fdaf3a7a63e4564b3b8d30d4e9133 (patch) | |
tree | 5beb9de8291820460f0297b7389e2e8f28218bf4 /llvm/lib/IR/AttributeImpl.h | |
parent | 57819aa185196b8d3c4dda3c2282d2128aef3a51 (diff) | |
download | bcm5719-llvm-af28e7d6fa1fdaf3a7a63e4564b3b8d30d4e9133.tar.gz bcm5719-llvm-af28e7d6fa1fdaf3a7a63e4564b3b8d30d4e9133.zip |
Apply clang-tidy's modernize-loop-convert to most of lib/IR.
Only minor manual fixes. No functionality change intended.
llvm-svn: 273813
Diffstat (limited to 'llvm/lib/IR/AttributeImpl.h')
-rw-r--r-- | llvm/lib/IR/AttributeImpl.h | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/llvm/lib/IR/AttributeImpl.h b/llvm/lib/IR/AttributeImpl.h index 500e7a35985..267a0dab2f2 100644 --- a/llvm/lib/IR/AttributeImpl.h +++ b/llvm/lib/IR/AttributeImpl.h @@ -162,9 +162,9 @@ class AttributeSetNode final // There's memory after the node where we can store the entries in. std::copy(Attrs.begin(), Attrs.end(), getTrailingObjects<Attribute>()); - for (iterator I = begin(), E = end(); I != E; ++I) { - if (!I->isStringAttribute()) { - AvailableAttrs |= ((uint64_t)1) << I->getKindAsEnum(); + for (Attribute I : *this) { + if (!I.isStringAttribute()) { + AvailableAttrs |= ((uint64_t)1) << I.getKindAsEnum(); } } } @@ -265,10 +265,9 @@ public: const std::pair<unsigned, AttributeSetNode *> &Last = Slots.back(); if (Last.first == AttributeSet::FunctionIndex) { const AttributeSetNode *Node = Last.second; - for (AttributeSetNode::iterator I = Node->begin(), E = Node->end(); - I != E; ++I) { - if (!I->isStringAttribute()) - AvailableFunctionAttrs |= ((uint64_t)1) << I->getKindAsEnum(); + for (Attribute I : *Node) { + if (!I.isStringAttribute()) + AvailableFunctionAttrs |= ((uint64_t)1) << I.getKindAsEnum(); } } } |