summaryrefslogtreecommitdiff
path: root/include/llvm
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-03-06 17:16:43 +0000
committerChris Lattner <sabre@nondot.org>2002-03-06 17:16:43 +0000
commit4ce0f8aa9ee0038ba741291e2ae1188be75d1d8b (patch)
tree82d9a07f42146cb977669fc772766aeea67af2b9 /include/llvm
parent9ee9d711995e2ed6c17d4d4bc11362767d5703b3 (diff)
downloadllvm-4ce0f8aa9ee0038ba741291e2ae1188be75d1d8b.tar.gz
llvm-4ce0f8aa9ee0038ba741291e2ae1188be75d1d8b.tar.bz2
llvm-4ce0f8aa9ee0038ba741291e2ae1188be75d1d8b.tar.xz
Take CallGraph out of the CFG namespace. It has nothing to do with CFGs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1820 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm')
-rw-r--r--include/llvm/Analysis/CallGraph.h30
1 files changed, 13 insertions, 17 deletions
diff --git a/include/llvm/Analysis/CallGraph.h b/include/llvm/Analysis/CallGraph.h
index cc6d023d6d..a2494654c5 100644
--- a/include/llvm/Analysis/CallGraph.h
+++ b/include/llvm/Analysis/CallGraph.h
@@ -21,8 +21,6 @@
class Method;
class Module;
-namespace cfg {
-
class CallGraph;
class CallGraphNode {
Method *Meth;
@@ -141,41 +139,39 @@ private: // Implementation of CallGraph construction
void addToCallGraph(Method *M);
};
-} // end namespace cfg
-
// Provide graph traits for tranversing call graphs using standard graph
// traversals.
-template <> struct GraphTraits<cfg::CallGraphNode*> {
- typedef cfg::CallGraphNode NodeType;
+template <> struct GraphTraits<CallGraphNode*> {
+ typedef CallGraphNode NodeType;
typedef NodeType::iterator ChildIteratorType;
- static NodeType *getEntryNode(cfg::CallGraphNode *CGN) { return CGN; }
+ static NodeType *getEntryNode(CallGraphNode *CGN) { return CGN; }
static inline ChildIteratorType child_begin(NodeType *N) { return N->begin();}
static inline ChildIteratorType child_end (NodeType *N) { return N->end(); }
};
-template <> struct GraphTraits<const cfg::CallGraphNode*> {
- typedef const cfg::CallGraphNode NodeType;
+template <> struct GraphTraits<const CallGraphNode*> {
+ typedef const CallGraphNode NodeType;
typedef NodeType::const_iterator ChildIteratorType;
- static NodeType *getEntryNode(const cfg::CallGraphNode *CGN) { return CGN; }
+ static NodeType *getEntryNode(const CallGraphNode *CGN) { return CGN; }
static inline ChildIteratorType child_begin(NodeType *N) { return N->begin();}
static inline ChildIteratorType child_end (NodeType *N) { return N->end(); }
};
-template<> struct GraphTraits<cfg::CallGraph*> :
- public GraphTraits<cfg::CallGraphNode*> {
- static NodeType *getEntryNode(cfg::CallGraph *CGN) {
+template<> struct GraphTraits<CallGraph*> :
+ public GraphTraits<CallGraphNode*> {
+ static NodeType *getEntryNode(CallGraph *CGN) {
return CGN->getRoot();
}
};
-template<> struct GraphTraits<const cfg::CallGraph*> :
- public GraphTraits<const cfg::CallGraphNode*> {
- static NodeType *getEntryNode(const cfg::CallGraph *CGN) {
+template<> struct GraphTraits<const CallGraph*> :
+ public GraphTraits<const CallGraphNode*> {
+ static NodeType *getEntryNode(const CallGraph *CGN) {
return CGN->getRoot();
}
};
@@ -185,6 +181,6 @@ template<> struct GraphTraits<const cfg::CallGraph*> :
// Note that this uses the call graph only if one is provided.
// It does not build the call graph.
//
-bool isLeafMethod(const Method* method, const cfg::CallGraph *callGraph = 0);
+bool isLeafMethod(const Method* method, const CallGraph *callGraph = 0);
#endif