summaryrefslogtreecommitdiffstats
path: root/llvm/include/llvm/CodeGen/DIE.h
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/include/llvm/CodeGen/DIE.h')
-rw-r--r--llvm/include/llvm/CodeGen/DIE.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/llvm/include/llvm/CodeGen/DIE.h b/llvm/include/llvm/CodeGen/DIE.h
index efc27b340f8..464e0faa0ed 100644
--- a/llvm/include/llvm/CodeGen/DIE.h
+++ b/llvm/include/llvm/CodeGen/DIE.h
@@ -496,8 +496,12 @@ public:
unsigned getOffset() const { return Offset; }
unsigned getSize() const { return Size; }
bool hasChildren() const { return !Children.empty(); }
- const std::vector<std::unique_ptr<DIE>> &getChildren() const {
- return Children;
+
+ typedef std::vector<std::unique_ptr<DIE>>::const_iterator child_iterator;
+ typedef iterator_range<child_iterator> child_range;
+
+ child_range children() const {
+ return llvm::make_range(Children.begin(), Children.end());
}
typedef SmallVectorImpl<DIEValue>::const_iterator value_iterator;
OpenPOWER on IntegriCloud