[llvm-commits] [llvm] r70496 - /llvm/trunk/include/llvm/Support/DataFlow.h

Torok Edwin edwintorok at gmail.com
Thu Apr 30 10:09:22 PDT 2009


Author: edwin
Date: Thu Apr 30 12:09:22 2009
New Revision: 70496

URL: http://llvm.org/viewvc/llvm-project?rev=70496&view=rev
Log:
Make dataflow iteration possible on Value*, not only on User*: df_ext_iterator<Value*, SmallPtrSet<const Value*, 16> >

Modified:
    llvm/trunk/include/llvm/Support/DataFlow.h

Modified: llvm/trunk/include/llvm/Support/DataFlow.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/DataFlow.h?rev=70496&r1=70495&r2=70496&view=diff

==============================================================================
--- llvm/trunk/include/llvm/Support/DataFlow.h (original)
+++ llvm/trunk/include/llvm/Support/DataFlow.h Thu Apr 30 12:09:22 2009
@@ -23,11 +23,11 @@
 // 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<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;
   }
 





More information about the llvm-commits mailing list