SDNode: Add uses() iterator_range convenience methods.

llvm-svn: 206005
This commit is contained in:
Jim Grosbach 2014-04-11 00:27:17 +00:00
parent 29a2b955fb
commit e2e1c35566
1 changed files with 7 additions and 0 deletions

View File

@ -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