mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-26 21:47:07 +00:00
Make dataflow iteration possible on Value*, not only on User*: df_ext_iterator<Value*, SmallPtrSet<const Value*, 16> >
llvm-svn: 70496
This commit is contained in:
parent
25d21786d3
commit
1400b41bf1
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user