When someone includes CallGraph.h, make sure that they link in CallGraph.cpp
authorChris Lattner <sabre@nondot.org>
Thu, 30 Oct 2003 05:17:30 +0000 (05:17 +0000)
committerChris Lattner <sabre@nondot.org>
Thu, 30 Oct 2003 05:17:30 +0000 (05:17 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9611 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Analysis/CallGraph.h
lib/Analysis/IPA/CallGraph.cpp

index f562a51db39814c4ccbdb978905f5dbf36bc423e..3a51b05655075f8bbfe921da7e882fa7b6f2caf0 100644 (file)
@@ -151,6 +151,8 @@ public:
   ///
   void print(std::ostream &o, const Module *M) const;
 
+  // stub - dummy function, just ignore it
+  static void stub();
 private:
   //===---------------------------------------------------------------------
   // Implementation of CallGraph construction
@@ -282,4 +284,8 @@ template<> struct GraphTraits<const CallGraph*> :
   static nodes_iterator nodes_end  (const CallGraph *CG) { return CG->end(); }
 };
 
+// Make sure that any clients of this file link in PostDominators.cpp
+static IncludeFile
+CALLGRAPH_INCLUDE_FILE((void*)&CallGraph::stub);
+
 #endif
index 59fd1a2705c47c7a77c6768da3e16c4c3eab8948..f5be91c8acfbf5c7464b329ce6f4dc96a1763bbf 100644 (file)
@@ -316,3 +316,4 @@ Function *CallGraph::removeFunctionFromModule(CallGraphNode *CGN) {
   return F;
 }
 
+void CallGraph::stub() {}