Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-05-10 08:43:11

0001 //===-- CallPrinter.h - Call graph printer external interface ----*- C++ -*-===//
0002 //
0003 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
0004 // See https://llvm.org/LICENSE.txt for license information.
0005 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
0006 //
0007 //===----------------------------------------------------------------------===//
0008 //
0009 // This file defines external functions that can be called to explicitly
0010 // instantiate the call graph printer.
0011 //
0012 //===----------------------------------------------------------------------===//
0013 
0014 #ifndef LLVM_ANALYSIS_CALLPRINTER_H
0015 #define LLVM_ANALYSIS_CALLPRINTER_H
0016 
0017 #include "llvm/IR/PassManager.h"
0018 
0019 namespace llvm {
0020 
0021 class ModulePass;
0022 
0023 /// Pass for printing the call graph to a dot file
0024 class CallGraphDOTPrinterPass : public PassInfoMixin<CallGraphDOTPrinterPass> {
0025 public:
0026   PreservedAnalyses run(Module &M, ModuleAnalysisManager &AM);
0027   static bool isRequired() { return true; }
0028 };
0029 
0030 /// Pass for viewing the call graph
0031 class CallGraphViewerPass : public PassInfoMixin<CallGraphViewerPass> {
0032 public:
0033   PreservedAnalyses run(Module &M, ModuleAnalysisManager &AM);
0034   static bool isRequired() { return true; }
0035 };
0036 
0037 ModulePass *createCallGraphViewerPass();
0038 ModulePass *createCallGraphDOTPrinterPass();
0039 
0040 } // end namespace llvm
0041 
0042 #endif