#include "llvm/Analysis/CallGraph.h"
#include "llvm/ADT/SCCIterator.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/Config/llvm-config.h"
#include "llvm/IR/AbstractCallSite.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/IntrinsicInst.h"
#include "llvm/IR/Module.h"
#include "llvm/IR/PassManager.h"
#include "llvm/InitializePasses.h"
#include "llvm/Pass.h"
#include "llvm/Support/Compiler.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/raw_ostream.h"
#include <cassert>
usingnamespacellvm;
CallGraph::CallGraph(Module &M)
: … { … }
CallGraph::CallGraph(CallGraph &&Arg)
: … { … }
CallGraph::~CallGraph() { … }
bool CallGraph::invalidate(Module &, const PreservedAnalyses &PA,
ModuleAnalysisManager::Invalidator &) { … }
void CallGraph::addToCallGraph(Function *F) { … }
void CallGraph::populateCallGraphNode(CallGraphNode *Node) { … }
void CallGraph::print(raw_ostream &OS) const { … }
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
LLVM_DUMP_METHOD void CallGraph::dump() const { print(dbgs()); }
#endif
void CallGraph::ReplaceExternalCallEdge(CallGraphNode *Old,
CallGraphNode *New) { … }
Function *CallGraph::removeFunctionFromModule(CallGraphNode *CGN) { … }
CallGraphNode *CallGraph::getOrInsertFunction(const Function *F) { … }
void CallGraphNode::print(raw_ostream &OS) const { … }
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
LLVM_DUMP_METHOD void CallGraphNode::dump() const { print(dbgs()); }
#endif
void CallGraphNode::removeCallEdgeFor(CallBase &Call) { … }
void CallGraphNode::removeAnyCallEdgeTo(CallGraphNode *Callee) { … }
void CallGraphNode::removeOneAbstractEdgeTo(CallGraphNode *Callee) { … }
void CallGraphNode::replaceCallEdge(CallBase &Call, CallBase &NewCall,
CallGraphNode *NewNode) { … }
AnalysisKey CallGraphAnalysis::Key;
PreservedAnalyses CallGraphPrinterPass::run(Module &M,
ModuleAnalysisManager &AM) { … }
PreservedAnalyses CallGraphSCCsPrinterPass::run(Module &M,
ModuleAnalysisManager &AM) { … }
CallGraphWrapperPass::CallGraphWrapperPass() : … { … }
CallGraphWrapperPass::~CallGraphWrapperPass() = default;
void CallGraphWrapperPass::getAnalysisUsage(AnalysisUsage &AU) const { … }
bool CallGraphWrapperPass::runOnModule(Module &M) { … }
INITIALIZE_PASS(…)
char CallGraphWrapperPass::ID = …;
void CallGraphWrapperPass::releaseMemory() { … }
void CallGraphWrapperPass::print(raw_ostream &OS, const Module *) const { … }
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
LLVM_DUMP_METHOD
void CallGraphWrapperPass::dump() const { print(dbgs(), nullptr); }
#endif