Left: | ||
Right: |
OLD | NEW |
---|---|
1 //===--- CFG.h - Classes for representing and building CFGs------*- C++ -*-===// | 1 //===--- CFG.h - Classes for representing and building CFGs------*- C++ -*-===// |
2 // | 2 // |
3 // The LLVM Compiler Infrastructure | 3 // The LLVM Compiler Infrastructure |
4 // | 4 // |
5 // This file is distributed under the University of Illinois Open Source | 5 // This file is distributed under the University of Illinois Open Source |
6 // License. See LICENSE.TXT for details. | 6 // License. See LICENSE.TXT for details. |
7 // | 7 // |
8 //===----------------------------------------------------------------------===// | 8 //===----------------------------------------------------------------------===// |
9 // | 9 // |
10 // This file defines the CFG and CFGBuilder classes for representing and | 10 // This file defines the CFG and CFGBuilder classes for representing and |
(...skipping 778 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
789 | 789 |
790 template <> struct GraphTraits<Inverse<const ::clang::CFG*> > | 790 template <> struct GraphTraits<Inverse<const ::clang::CFG*> > |
791 : public GraphTraits<Inverse<const ::clang::CFGBlock*> > { | 791 : public GraphTraits<Inverse<const ::clang::CFGBlock*> > { |
792 | 792 |
793 typedef ::clang::CFG::const_iterator nodes_iterator; | 793 typedef ::clang::CFG::const_iterator nodes_iterator; |
794 | 794 |
795 static NodeType *getEntryNode(const ::clang::CFG* F) { return &F->getExit(); } | 795 static NodeType *getEntryNode(const ::clang::CFG* F) { return &F->getExit(); } |
796 static nodes_iterator nodes_begin(const ::clang::CFG* F) { return F->begin();} | 796 static nodes_iterator nodes_begin(const ::clang::CFG* F) { return F->begin();} |
797 static nodes_iterator nodes_end(const ::clang::CFG* F) { return F->end(); } | 797 static nodes_iterator nodes_end(const ::clang::CFG* F) { return F->end(); } |
798 }; | 798 }; |
799 | |
800 | |
chandlerc
2011/08/19 23:54:06
extaneous blank line
supertri
2011/08/22 18:30:16
This section is deleted in the later patch.
On 20
| |
801 template <> struct IndexedGraphTraits< ::clang::CFG*> | |
802 : public GraphTraits< ::clang::CFG*> { | |
803 static unsigned int getIndex(const NodeType *Node) { | |
804 return Node->getBlockID(); | |
805 } | |
806 static unsigned int getMaxIndex(const ::clang::CFG *Graph) { | |
807 return Graph->getNumBlockIDs(); | |
808 } | |
809 }; | |
810 | |
811 | |
chandlerc
2011/08/19 23:54:06
ditto
| |
812 template <> struct IndexedGraphTraits<const ::clang::CFG*> | |
813 : public GraphTraits<const ::clang::CFG*> { | |
814 static unsigned int getIndex(const NodeType *Node) { | |
815 return Node->getBlockID(); | |
816 } | |
817 static unsigned int getMaxIndex(const ::clang::CFG *Graph) { | |
818 return Graph->getNumBlockIDs(); | |
819 } | |
820 }; | |
821 | |
822 | |
chandlerc
2011/08/19 23:54:06
and ditto
| |
799 } // end llvm namespace | 823 } // end llvm namespace |
800 #endif | 824 #endif |
OLD | NEW |