From: Jim Grosbach Date: Fri, 11 Apr 2014 00:27:17 +0000 (+0000) Subject: SDNode: Add uses() iterator_range convenience methods. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=fb4b4203261910c4d416c9d2f9b612f311c60c4d;p=oota-llvm.git SDNode: Add uses() iterator_range convenience methods. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206005 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/CodeGen/SelectionDAGNodes.h b/include/llvm/CodeGen/SelectionDAGNodes.h index fd915b01d60..d71a69d6191 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 uses() { + return iterator_range(use_begin(), use_end()); + } + inline iterator_range uses() const { + return iterator_range(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