From 1400b41bf1c9a53fd8c5af87b7ea670df289d396 Mon Sep 17 00:00:00 2001 From: Torok Edwin Date: Thu, 30 Apr 2009 17:09:22 +0000 Subject: [PATCH] Make dataflow iteration possible on Value*, not only on User*: df_ext_iterator > llvm-svn: 70496 --- include/llvm/Support/DataFlow.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/llvm/Support/DataFlow.h b/include/llvm/Support/DataFlow.h index 4b94ba36a3f..8f79ead1c53 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 { +template <> struct GraphTraits { 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 { } }; -template <> struct GraphTraits { +template <> struct GraphTraits { typedef Value NodeType; typedef Value::use_iterator ChildIteratorType; - static NodeType *getEntryNode(User *G) { + static NodeType *getEntryNode(Value *G) { return G; }