summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJim Grosbach <grosbach@apple.com>2014-04-11 00:27:17 +0000
committerJim Grosbach <grosbach@apple.com>2014-04-11 00:27:17 +0000
commitfb4b4203261910c4d416c9d2f9b612f311c60c4d (patch)
tree394f2a81f9804ceed3f59966696c7128a54bae3e /include
parent42382d3e37d3e110cabac876fb081b1358489649 (diff)
downloadllvm-fb4b4203261910c4d416c9d2f9b612f311c60c4d.tar.gz
llvm-fb4b4203261910c4d416c9d2f9b612f311c60c4d.tar.bz2
llvm-fb4b4203261910c4d416c9d2f9b612f311c60c4d.tar.xz
SDNode: Add uses() iterator_range convenience methods.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206005 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/CodeGen/SelectionDAGNodes.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/llvm/CodeGen/SelectionDAGNodes.h b/include/llvm/CodeGen/SelectionDAGNodes.h
index fd915b01d6..d71a69d619 100644
--- a/include/llvm/CodeGen/SelectionDAGNodes.h
+++ b/include/llvm/CodeGen/SelectionDAGNodes.h
@@ -19,6 +19,7 @@
#ifndef LLVM_CODEGEN_SELECTIONDAGNODES_H
#define LLVM_CODEGEN_SELECTIONDAGNODES_H
+#include "llvm/ADT/iterator_range.h"
#include "llvm/ADT/FoldingSet.h"
#include "llvm/ADT/GraphTraits.h"
#include "llvm/ADT/STLExtras.h"
@@ -507,6 +508,12 @@ public:
static use_iterator use_end() { return use_iterator(0); }
+ inline iterator_range<use_iterator> uses() {
+ return iterator_range<use_iterator>(use_begin(), use_end());
+ }
+ inline iterator_range<use_iterator> uses() const {
+ return iterator_range<use_iterator>(use_begin(), use_end());
+ }
/// hasNUsesOfValue - Return true if there are exactly NUSES uses of the
/// indicated value. This method ignores uses of other values defined by this