diff --git a/include/llvm/Analysis/CallGraph.h b/include/llvm/Analysis/CallGraph.h index f562a51db39..3a51b056550 100644 --- a/include/llvm/Analysis/CallGraph.h +++ b/include/llvm/Analysis/CallGraph.h @@ -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 : 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 diff --git a/lib/Analysis/IPA/CallGraph.cpp b/lib/Analysis/IPA/CallGraph.cpp index 59fd1a2705c..f5be91c8acf 100644 --- a/lib/Analysis/IPA/CallGraph.cpp +++ b/lib/Analysis/IPA/CallGraph.cpp @@ -316,3 +316,4 @@ Function *CallGraph::removeFunctionFromModule(CallGraphNode *CGN) { return F; } +void CallGraph::stub() {}