Make dataflow iteration possible on Value*, not only on User*: df_ext_iterator<Value...
authorTorok Edwin <edwintorok@gmail.com>
Thu, 30 Apr 2009 17:09:22 +0000 (17:09 +0000)
committerTorok Edwin <edwintorok@gmail.com>
Thu, 30 Apr 2009 17:09:22 +0000 (17:09 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70496 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Support/DataFlow.h

index 4b94ba36a3fcc8f6d72de06377b060bb2a1e5dcf..8f79ead1c5338bc8b0c253952e7e649bd363bc28 100644 (file)
@@ -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;
   }