Added LLVM copyright header (for lack of a better term).
[oota-llvm.git] / include / llvm / Analysis / CallGraph.h
index 69dc5cf44212dbf78d16dfffd905da3145d41828..f562a51db39814c4ccbdb978905f5dbf36bc423e 100644 (file)
@@ -1,4 +1,11 @@
-//===- CallGraph.h - Build a Module's call graph -----------------*- C++ -*--=//
+//===- CallGraph.h - Build a Module's call graph ----------------*- C++ -*-===//
+// 
+//                     The LLVM Compiler Infrastructure
+//
+// This file was developed by the LLVM research group and is distributed under
+// the University of Illinois Open Source License. See LICENSE.TXT for details.
+// 
+//===----------------------------------------------------------------------===//
 //
 // This interface is used to build and manipulate a call graph, which is a very 
 // useful tool for interprocedural optimization.
@@ -41,8 +48,6 @@
 #ifndef LLVM_ANALYSIS_CALLGRAPH_H
 #define LLVM_ANALYSIS_CALLGRAPH_H
 
-#include <assert.h>
-
 #include "Support/GraphTraits.h"
 #include "Support/STLExtras.h"
 #include "llvm/Pass.h"
@@ -106,7 +111,7 @@ public:
   // Functions to keep a call graph up to date with a function that has been
   // modified
   //
-  void addFunctionToModule(Function *Meth);
+  void addFunctionToModule(Function *F);
 
 
   // removeFunctionFromModule - Unlink the function from this module, returning
@@ -116,8 +121,8 @@ public:
   // is to dropAllReferences before calling this.
   //
   Function *removeFunctionFromModule(CallGraphNode *CGN);
-  Function *removeFunctionFromModule(Function *Meth) {
-    return removeFunctionFromModule((*this)[Meth]);
+  Function *removeFunctionFromModule(Function *F) {
+    return removeFunctionFromModule((*this)[F]);
   }
 
 
@@ -170,7 +175,7 @@ private:
 // CallGraphNode class definition
 //
 class CallGraphNode {
-  Function *Meth;
+  Function *F;
   std::vector<CallGraphNode*> CalledFunctions;
 
   CallGraphNode(const CallGraphNode &);           // Do not implement
@@ -183,7 +188,7 @@ public:
   typedef std::vector<CallGraphNode*>::const_iterator const_iterator;
 
   // getFunction - Return the function that this call graph node represents...
-  Function *getFunction() const { return Meth; }
+  Function *getFunction() const { return F; }
 
   inline iterator begin() { return CalledFunctions.begin(); }
   inline iterator end()   { return CalledFunctions.end();   }
@@ -209,7 +214,7 @@ private:                    // Stuff to construct the node, used by CallGraph
   friend class CallGraph;
 
   // CallGraphNode ctor - Create a node for the specified function...
-  inline CallGraphNode(Function *F) : Meth(F) {}
+  inline CallGraphNode(Function *f) : F(f) {}
   
   // addCalledFunction add a function to the list of functions called by this
   // one