diff options
author | Torok Edwin <edwintorok@gmail.com> | 2009-04-30 17:09:22 +0000 |
---|---|---|
committer | Torok Edwin <edwintorok@gmail.com> | 2009-04-30 17:09:22 +0000 |
commit | 7f09dd2f63f502731fd61171c59504187dd74592 (patch) | |
tree | 30a0c2ed809f89138657b3d90565590f0641b946 /include/llvm/Support/DataFlow.h | |
parent | 4acd12a0cbe6d1e478e13feefbc67c654e552e68 (diff) | |
download | llvm-7f09dd2f63f502731fd61171c59504187dd74592.tar.gz llvm-7f09dd2f63f502731fd61171c59504187dd74592.tar.bz2 llvm-7f09dd2f63f502731fd61171c59504187dd74592.tar.xz |
Make dataflow iteration possible on Value*, not only on User*: df_ext_iterator<Value*, SmallPtrSet<const Value*, 16> >
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70496 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Support/DataFlow.h')
-rw-r--r-- | include/llvm/Support/DataFlow.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/include/llvm/Support/DataFlow.h b/include/llvm/Support/DataFlow.h index 4b94ba36a3..8f79ead1c5 100644 --- a/include/llvm/Support/DataFlow.h +++ b/include/llvm/Support/DataFlow.h @@ -23,11 +23,11 @@ namespace llvm { // Provide specializations of GraphTraits to be able to treat def-use/use-def // chains as graphs -template <> struct GraphTraits<const User*> { +template <> struct GraphTraits<const Value*> { typedef const Value NodeType; typedef Value::use_const_iterator ChildIteratorType; - static NodeType *getEntryNode(const User *G) { + static NodeType *getEntryNode(const Value *G) { return G; } @@ -40,11 +40,11 @@ template <> struct GraphTraits<const User*> { } }; -template <> struct GraphTraits<User*> { +template <> struct GraphTraits<Value*> { typedef Value NodeType; typedef Value::use_iterator ChildIteratorType; - static NodeType *getEntryNode(User *G) { + static NodeType *getEntryNode(Value *G) { return G; } |