//
//===----------------------------------------------------------------------===//
//
-// This file defines specializations of GraphTraits that allows Use-Def and
+// This file defines specializations of GraphTraits that allows Use-Def and
// Def-Use relations to be treated as proper graphs for generic algorithms.
//===----------------------------------------------------------------------===//
#define LLVM_SUPPORT_DATAFLOW_H
#include "llvm/User.h"
-#include "llvm/Value.h"
#include "llvm/ADT/GraphTraits.h"
namespace llvm {
//===----------------------------------------------------------------------===//
-// Provide specializations of GraphTraits to be able to treat def-use/use-def
+// 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;
+ typedef Value::const_use_iterator ChildIteratorType;
- static NodeType *getEntryNode(const User *G) {
+ static NodeType *getEntryNode(const Value *G) {
return G;
}
}
};
-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;
}