LLVM API Documentation

PrintModulePass.h

Go to the documentation of this file.
00001 //===- llvm/Assembly/PrintModulePass.h - Printing Pass ----------*- C++ -*-===//
00002 //
00003 //                     The LLVM Compiler Infrastructure
00004 //
00005 // This file is distributed under the University of Illinois Open Source
00006 // License. See LICENSE.TXT for details.
00007 //
00008 //===----------------------------------------------------------------------===//
00009 //
00010 // This file defines two passes to print out a module.  The PrintModulePass pass
00011 // simply prints out the entire module when it is executed.  The
00012 // PrintFunctionPass class is designed to be pipelined with other
00013 // FunctionPass's, and prints out the functions of the module as they are
00014 // processed.
00015 //
00016 //===----------------------------------------------------------------------===//
00017 
00018 #ifndef LLVM_ASSEMBLY_PRINTMODULEPASS_H
00019 #define LLVM_ASSEMBLY_PRINTMODULEPASS_H
00020 
00021 #include <string>
00022 
00023 namespace llvm {
00024   class FunctionPass;
00025   class ModulePass;
00026   class raw_ostream;
00027   
00028   /// createPrintModulePass - Create and return a pass that writes the
00029   /// module to the specified raw_ostream.
00030   ModulePass *createPrintModulePass(raw_ostream *OS, bool DeleteStream=false);
00031   
00032   /// createPrintFunctionPass - Create and return a pass that prints
00033   /// functions to the specified raw_ostream as they are processed.
00034   FunctionPass *createPrintFunctionPass(const std::string &Banner,
00035                                         raw_ostream *OS, 
00036                                         bool DeleteStream=false);  
00037 
00038 } // End llvm namespace
00039 
00040 #endif