1 //===- IRPrintingPasses.h - Passes to print out IR constructs ---*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
11 /// This file defines passes to print out IR in various granularities. The
12 /// PrintModulePass pass simply prints out the entire module when it is
13 /// executed. The PrintFunctionPass class is designed to be pipelined with
14 /// other FunctionPass's, and prints out the functions of the module as they
17 //===----------------------------------------------------------------------===//
19 #ifndef LLVM_IR_PRINTMODULEPASS_H
20 #define LLVM_IR_PRINTMODULEPASS_H
30 /// \brief Create and return a pass that writes the module to the specified
32 ModulePass *createPrintModulePass(raw_ostream &OS,
33 const std::string &Banner = "");
35 /// \brief Create and return a pass that prints functions to the specified
36 /// \c raw_ostream as they are processed.
37 FunctionPass *createPrintFunctionPass(raw_ostream &OS,
38 const std::string &Banner = "");
40 /// \brief Create and return a pass that writes the BB to the specified
42 BasicBlockPass *createPrintBasicBlockPass(raw_ostream &OS,
43 const std::string &Banner = "");
45 /// \brief Pass for printing a Module as LLVM's text IR assembly.
47 /// NOTE: This pass is for use with the new pass manager. Use the create...Pass
48 /// functions above to create passes for use with the legacy pass manager.
49 class AOEUPrintModulePass {
52 } // End llvm namespace