Add CallGraph::getOrInsertFunction, to allow clients to update the callgraph
authorChris Lattner <sabre@nondot.org>
Sat, 14 Jan 2006 20:01:50 +0000 (20:01 +0000)
committerChris Lattner <sabre@nondot.org>
Sat, 14 Jan 2006 20:01:50 +0000 (20:01 +0000)
when they change the program

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25316 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Analysis/CallGraph.h

index e477be34f8ece49ed2bc9af2d8e72b3debbe2011..734306015c0fbad2aa48cf3379a4853aa98bde3e 100644 (file)
@@ -132,6 +132,11 @@ public:
   /// old code over).
   void changeFunction(Function *OldF, Function *NewF);
 
+  /// getOrInsertFunction - This method is identical to calling operator[], but
+  /// it will insert a new CallGraphNode for the specified function if one does
+  /// not already exist.
+  CallGraphNode *getOrInsertFunction(const Function *F);
+  
   //===---------------------------------------------------------------------
   // Pass infrastructure interface glue code...
   //