3c18bd59a0adf22bc51d5150f487a531956fe5ed
[oota-llvm.git] / include / llvm / IR / PrintModulePass.h
1 //===- PrintModulePass.h - IR Printing Passes -------------------*- C++ -*-===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This file defines two passes to print out a module.  The PrintModulePass pass
11 // simply prints out the entire module when it is executed.  The
12 // PrintFunctionPass class is designed to be pipelined with other
13 // FunctionPass's, and prints out the functions of the module as they are
14 // processed.
15 //
16 //===----------------------------------------------------------------------===//
17
18 #ifndef LLVM_IR_PRINTMODULEPASS_H
19 #define LLVM_IR_PRINTMODULEPASS_H
20
21 #include <string>
22
23 namespace llvm {
24 class FunctionPass;
25 class ModulePass;
26 class BasicBlockPass;
27 class raw_ostream;
28
29 /// createPrintModulePass - Create and return a pass that writes the
30 /// module to the specified raw_ostream.
31 ModulePass *createPrintModulePass(raw_ostream *OS, bool DeleteStream = false,
32                                   const std::string &Banner = "");
33
34 /// createPrintFunctionPass - Create and return a pass that prints
35 /// functions to the specified raw_ostream as they are processed.
36 FunctionPass *createPrintFunctionPass(const std::string &Banner,
37                                       raw_ostream *OS,
38                                       bool DeleteStream = false);
39
40 /// createPrintBasicBlockPass - Create and return a pass that writes the
41 /// BB to the specified raw_ostream.
42 BasicBlockPass *createPrintBasicBlockPass(raw_ostream *OS,
43                                           bool DeleteStream = false,
44                                           const std::string &Banner = "");
45
46 } // End llvm namespace
47
48 #endif