aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/IR/Attributes.cpp
diff options
context:
space:
mode:
authorKazu Hirata <kazu@google.com>2021-02-27 10:09:25 -0800
committerKazu Hirata <kazu@google.com>2021-02-27 10:09:25 -0800
commit6a337f85c8faa0040dc2ad0c0d8f0f033f7a162b (patch)
tree7d59f2cacde9107ff9bd104416747d0b740f35d4 /llvm/lib/IR/Attributes.cpp
parente8fa9014cce41e1057e295b035dda73420612686 (diff)
downloadllvm-6a337f85c8faa0040dc2ad0c0d8f0f033f7a162b.zip
llvm-6a337f85c8faa0040dc2ad0c0d8f0f033f7a162b.tar.gz
llvm-6a337f85c8faa0040dc2ad0c0d8f0f033f7a162b.tar.bz2
[IR] Use range-based for loops (NFC)
Diffstat (limited to 'llvm/lib/IR/Attributes.cpp')
-rw-r--r--llvm/lib/IR/Attributes.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/IR/Attributes.cpp b/llvm/lib/IR/Attributes.cpp
index c4629de..c98e5c3 100644
--- a/llvm/lib/IR/Attributes.cpp
+++ b/llvm/lib/IR/Attributes.cpp
@@ -1869,9 +1869,8 @@ bool AttrBuilder::operator==(const AttrBuilder &B) const {
if (Attrs != B.Attrs)
return false;
- for (td_const_iterator I = TargetDepAttrs.begin(),
- E = TargetDepAttrs.end(); I != E; ++I)
- if (B.TargetDepAttrs.find(I->first) == B.TargetDepAttrs.end())
+ for (const auto &TDA : TargetDepAttrs)
+ if (B.TargetDepAttrs.find(TDA.first) == B.TargetDepAttrs.end())
return false;
return Alignment == B.Alignment && StackAlignment == B.StackAlignment &&