summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/DIE.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DIE.cpp')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DIE.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DIE.cpp b/llvm/lib/CodeGen/AsmPrinter/DIE.cpp
index a899e34c7ee..fa8449e94c9 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DIE.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/DIE.cpp
@@ -136,13 +136,11 @@ const DIE *DIE::getUnitOrNull() const {
}
DIEValue DIE::findAttribute(dwarf::Attribute Attribute) const {
- const SmallVectorImpl<DIEValue> &Values = getValues();
-
// Iterate through all the attributes until we find the one we're
// looking for, if we can't find it return NULL.
- for (size_t i = 0; i < Values.size(); ++i)
- if (Values[i].getAttribute() == Attribute)
- return Values[i];
+ for (const auto &V : values())
+ if (V.getAttribute() == Attribute)
+ return V;
return DIEValue();
}
OpenPOWER on IntegriCloud