[PM] Rename the IR printing pass header to a more generic and correct

name to match the source file which I got earlier. Update the include
sites. Also modernize the comments in the header to use the more
recommended doxygen style.

llvm-svn: 199041
This commit is contained in:
Chandler Carruth 2014-01-12 11:10:32 +00:00
parent a54dc82e33
commit b8ddc7043c
16 changed files with 33 additions and 32 deletions

View File

@ -1,4 +1,4 @@
//===- PrintModulePass.h - IR Printing Passes -------------------*- C++ -*-===// //===- IRPrintingPasses.h - Passes to print out IR constructs ---*- C++ -*-===//
// //
// The LLVM Compiler Infrastructure // The LLVM Compiler Infrastructure
// //
@ -6,13 +6,14 @@
// License. See LICENSE.TXT for details. // License. See LICENSE.TXT for details.
// //
//===----------------------------------------------------------------------===// //===----------------------------------------------------------------------===//
// /// \file
// This file defines two passes to print out a module. The PrintModulePass pass ///
// simply prints out the entire module when it is executed. The /// This file defines passes to print out IR in various granularities. The
// PrintFunctionPass class is designed to be pipelined with other /// PrintModulePass pass simply prints out the entire module when it is
// FunctionPass's, and prints out the functions of the module as they are /// executed. The PrintFunctionPass class is designed to be pipelined with
// processed. /// other FunctionPass's, and prints out the functions of the module as they
// /// are processed.
///
//===----------------------------------------------------------------------===// //===----------------------------------------------------------------------===//
#ifndef LLVM_IR_PRINTMODULEPASS_H #ifndef LLVM_IR_PRINTMODULEPASS_H
@ -26,19 +27,19 @@ class ModulePass;
class BasicBlockPass; class BasicBlockPass;
class raw_ostream; class raw_ostream;
/// createPrintModulePass - Create and return a pass that writes the /// \brief Create and return a pass that writes the module to the specified
/// module to the specified raw_ostream. /// \c raw_ostream.
ModulePass *createPrintModulePass(raw_ostream *OS, bool DeleteStream = false, ModulePass *createPrintModulePass(raw_ostream *OS, bool DeleteStream = false,
const std::string &Banner = ""); const std::string &Banner = "");
/// createPrintFunctionPass - Create and return a pass that prints /// \brief Create and return a pass that prints functions to the specified
/// functions to the specified raw_ostream as they are processed. /// \c raw_ostream as they are processed.
FunctionPass *createPrintFunctionPass(const std::string &Banner, FunctionPass *createPrintFunctionPass(const std::string &Banner,
raw_ostream *OS, raw_ostream *OS,
bool DeleteStream = false); bool DeleteStream = false);
/// createPrintBasicBlockPass - Create and return a pass that writes the /// \brief Create and return a pass that writes the BB to the specified
/// BB to the specified raw_ostream. /// \c raw_ostream.
BasicBlockPass *createPrintBasicBlockPass(raw_ostream *OS, BasicBlockPass *createPrintBasicBlockPass(raw_ostream *OS,
bool DeleteStream = false, bool DeleteStream = false,
const std::string &Banner = ""); const std::string &Banner = "");

View File

@ -28,7 +28,7 @@
#include "llvm/Analysis/ScalarEvolution.h" #include "llvm/Analysis/ScalarEvolution.h"
#include "llvm/CodeGen/Passes.h" #include "llvm/CodeGen/Passes.h"
#include "llvm/IR/Function.h" #include "llvm/IR/Function.h"
#include "llvm/IR/PrintModulePass.h" #include "llvm/IR/IRPrintingPasses.h"
#include "llvm/Transforms/IPO.h" #include "llvm/Transforms/IPO.h"
#include "llvm/Transforms/Instrumentation.h" #include "llvm/Transforms/Instrumentation.h"
#include "llvm/Transforms/ObjCARC.h" #include "llvm/Transforms/ObjCARC.h"

View File

@ -14,7 +14,7 @@
//===----------------------------------------------------------------------===// //===----------------------------------------------------------------------===//
#include "llvm/Analysis/LoopPass.h" #include "llvm/Analysis/LoopPass.h"
#include "llvm/IR/PrintModulePass.h" #include "llvm/IR/IRPrintingPasses.h"
#include "llvm/Support/Debug.h" #include "llvm/Support/Debug.h"
#include "llvm/Support/Timer.h" #include "llvm/Support/Timer.h"
using namespace llvm; using namespace llvm;

View File

@ -17,7 +17,7 @@
#include "llvm/CodeGen/MachineFunctionAnalysis.h" #include "llvm/CodeGen/MachineFunctionAnalysis.h"
#include "llvm/CodeGen/MachineModuleInfo.h" #include "llvm/CodeGen/MachineModuleInfo.h"
#include "llvm/CodeGen/Passes.h" #include "llvm/CodeGen/Passes.h"
#include "llvm/IR/PrintModulePass.h" #include "llvm/IR/IRPrintingPasses.h"
#include "llvm/MC/MCAsmInfo.h" #include "llvm/MC/MCAsmInfo.h"
#include "llvm/MC/MCContext.h" #include "llvm/MC/MCContext.h"
#include "llvm/MC/MCInstrInfo.h" #include "llvm/MC/MCInstrInfo.h"

View File

@ -18,7 +18,7 @@
#include "llvm/CodeGen/GCStrategy.h" #include "llvm/CodeGen/GCStrategy.h"
#include "llvm/CodeGen/MachineFunctionPass.h" #include "llvm/CodeGen/MachineFunctionPass.h"
#include "llvm/CodeGen/RegAllocRegistry.h" #include "llvm/CodeGen/RegAllocRegistry.h"
#include "llvm/IR/PrintModulePass.h" #include "llvm/IR/IRPrintingPasses.h"
#include "llvm/MC/MCAsmInfo.h" #include "llvm/MC/MCAsmInfo.h"
#include "llvm/PassManager.h" #include "llvm/PassManager.h"
#include "llvm/Support/CommandLine.h" #include "llvm/Support/CommandLine.h"

View File

@ -24,12 +24,12 @@
#include "llvm/IR/CallingConv.h" #include "llvm/IR/CallingConv.h"
#include "llvm/IR/Constants.h" #include "llvm/IR/Constants.h"
#include "llvm/IR/DerivedTypes.h" #include "llvm/IR/DerivedTypes.h"
#include "llvm/IR/IRPrintingPasses.h"
#include "llvm/IR/InlineAsm.h" #include "llvm/IR/InlineAsm.h"
#include "llvm/IR/IntrinsicInst.h" #include "llvm/IR/IntrinsicInst.h"
#include "llvm/IR/LLVMContext.h" #include "llvm/IR/LLVMContext.h"
#include "llvm/IR/Module.h" #include "llvm/IR/Module.h"
#include "llvm/IR/Operator.h" #include "llvm/IR/Operator.h"
#include "llvm/IR/PrintModulePass.h"
#include "llvm/IR/TypeFinder.h" #include "llvm/IR/TypeFinder.h"
#include "llvm/IR/ValueSymbolTable.h" #include "llvm/IR/ValueSymbolTable.h"
#include "llvm/Support/CFG.h" #include "llvm/Support/CFG.h"

View File

@ -11,7 +11,7 @@
// //
//===----------------------------------------------------------------------===// //===----------------------------------------------------------------------===//
#include "llvm/IR/PrintModulePass.h" #include "llvm/IR/IRPrintingPasses.h"
#include "llvm/IR/Function.h" #include "llvm/IR/Function.h"
#include "llvm/IR/Module.h" #include "llvm/IR/Module.h"
#include "llvm/Pass.h" #include "llvm/Pass.h"

View File

@ -12,7 +12,7 @@
//===----------------------------------------------------------------------===// //===----------------------------------------------------------------------===//
#include "llvm/IR/PrintModulePass.h" #include "llvm/IR/IRPrintingPasses.h"
#include "llvm/IR/LegacyPassManager.h" #include "llvm/IR/LegacyPassManager.h"
#include "llvm/IR/LegacyPassManagers.h" #include "llvm/IR/LegacyPassManagers.h"
#include "llvm/IR/Module.h" #include "llvm/IR/Module.h"

View File

@ -14,7 +14,7 @@
//===----------------------------------------------------------------------===// //===----------------------------------------------------------------------===//
#include "llvm/Pass.h" #include "llvm/Pass.h"
#include "llvm/IR/PrintModulePass.h" #include "llvm/IR/IRPrintingPasses.h"
#include "llvm/PassRegistry.h" #include "llvm/PassRegistry.h"
#include "llvm/Support/Debug.h" #include "llvm/Support/Debug.h"
#include "llvm/Support/PassNameParser.h" #include "llvm/Support/PassNameParser.h"

View File

@ -1924,11 +1924,11 @@ void CppWriter::printProgram(const std::string& fname,
Out << "#include <llvm/IR/DerivedTypes.h>\n"; Out << "#include <llvm/IR/DerivedTypes.h>\n";
Out << "#include <llvm/IR/Function.h>\n"; Out << "#include <llvm/IR/Function.h>\n";
Out << "#include <llvm/IR/GlobalVariable.h>\n"; Out << "#include <llvm/IR/GlobalVariable.h>\n";
Out << "#include <llvm/IR/IRPrintingPasses.h>\n";
Out << "#include <llvm/IR/InlineAsm.h>\n"; Out << "#include <llvm/IR/InlineAsm.h>\n";
Out << "#include <llvm/IR/Instructions.h>\n"; Out << "#include <llvm/IR/Instructions.h>\n";
Out << "#include <llvm/IR/LLVMContext.h>\n"; Out << "#include <llvm/IR/LLVMContext.h>\n";
Out << "#include <llvm/IR/Module.h>\n"; Out << "#include <llvm/IR/Module.h>\n";
Out << "#include <llvm/IR/PrintModulePass.h>\n";
Out << "#include <llvm/Support/FormattedStream.h>\n"; Out << "#include <llvm/Support/FormattedStream.h>\n";
Out << "#include <llvm/Support/MathExtras.h>\n"; Out << "#include <llvm/Support/MathExtras.h>\n";
Out << "#include <algorithm>\n"; Out << "#include <algorithm>\n";

View File

@ -25,7 +25,7 @@
#include "llvm/CodeGen/MachineModuleInfo.h" #include "llvm/CodeGen/MachineModuleInfo.h"
#include "llvm/CodeGen/Passes.h" #include "llvm/CodeGen/Passes.h"
#include "llvm/IR/DataLayout.h" #include "llvm/IR/DataLayout.h"
#include "llvm/IR/PrintModulePass.h" #include "llvm/IR/IRPrintingPasses.h"
#include "llvm/MC/MCAsmInfo.h" #include "llvm/MC/MCAsmInfo.h"
#include "llvm/MC/MCInstrInfo.h" #include "llvm/MC/MCInstrInfo.h"
#include "llvm/MC/MCStreamer.h" #include "llvm/MC/MCStreamer.h"

View File

@ -14,9 +14,9 @@
//===----------------------------------------------------------------------===// //===----------------------------------------------------------------------===//
#include "llvm/IR/LLVMContext.h"
#include "llvm/ADT/Triple.h" #include "llvm/ADT/Triple.h"
#include "llvm/IR/PrintModulePass.h" #include "llvm/IR/IRPrintingPasses.h"
#include "llvm/IR/LLVMContext.h"
#include "llvm/CodeGen/CommandFlags.h" #include "llvm/CodeGen/CommandFlags.h"
#include "llvm/CodeGen/LinkAllAsmWriterComponents.h" #include "llvm/CodeGen/LinkAllAsmWriterComponents.h"
#include "llvm/CodeGen/LinkAllCodegenComponents.h" #include "llvm/CodeGen/LinkAllCodegenComponents.h"

View File

@ -12,12 +12,12 @@
// //
//===----------------------------------------------------------------------===// //===----------------------------------------------------------------------===//
#include "llvm/IR/LLVMContext.h"
#include "llvm/ADT/SetVector.h" #include "llvm/ADT/SetVector.h"
#include "llvm/ADT/SmallPtrSet.h" #include "llvm/ADT/SmallPtrSet.h"
#include "llvm/IR/PrintModulePass.h"
#include "llvm/Bitcode/ReaderWriter.h" #include "llvm/Bitcode/ReaderWriter.h"
#include "llvm/IR/DataLayout.h" #include "llvm/IR/DataLayout.h"
#include "llvm/IR/IRPrintingPasses.h"
#include "llvm/IR/LLVMContext.h"
#include "llvm/IR/Module.h" #include "llvm/IR/Module.h"
#include "llvm/IRReader/IRReader.h" #include "llvm/IRReader/IRReader.h"
#include "llvm/PassManager.h" #include "llvm/PassManager.h"

View File

@ -11,13 +11,13 @@
// different components in LLVM. // different components in LLVM.
// //
//===----------------------------------------------------------------------===// //===----------------------------------------------------------------------===//
#include "llvm/IR/LLVMContext.h"
#include "llvm/ADT/OwningPtr.h" #include "llvm/ADT/OwningPtr.h"
#include "llvm/Analysis/CallGraphSCCPass.h" #include "llvm/Analysis/CallGraphSCCPass.h"
#include "llvm/Analysis/Verifier.h" #include "llvm/Analysis/Verifier.h"
#include "llvm/IR/PrintModulePass.h"
#include "llvm/IR/Constants.h" #include "llvm/IR/Constants.h"
#include "llvm/IR/IRPrintingPasses.h"
#include "llvm/IR/Instruction.h" #include "llvm/IR/Instruction.h"
#include "llvm/IR/LLVMContext.h"
#include "llvm/IR/Module.h" #include "llvm/IR/Module.h"
#include "llvm/PassManager.h" #include "llvm/PassManager.h"
#include "llvm/Support/Debug.h" #include "llvm/Support/Debug.h"

View File

@ -24,9 +24,9 @@
#include "llvm/CodeGen/CommandFlags.h" #include "llvm/CodeGen/CommandFlags.h"
#include "llvm/DebugInfo.h" #include "llvm/DebugInfo.h"
#include "llvm/IR/DataLayout.h" #include "llvm/IR/DataLayout.h"
#include "llvm/IR/IRPrintingPasses.h"
#include "llvm/IR/LLVMContext.h" #include "llvm/IR/LLVMContext.h"
#include "llvm/IR/Module.h" #include "llvm/IR/Module.h"
#include "llvm/IR/PrintModulePass.h"
#include "llvm/IRReader/IRReader.h" #include "llvm/IRReader/IRReader.h"
#include "llvm/LinkAllIR.h" #include "llvm/LinkAllIR.h"
#include "llvm/LinkAllPasses.h" #include "llvm/LinkAllPasses.h"

View File

@ -27,11 +27,11 @@
#include "llvm/IR/DerivedTypes.h" #include "llvm/IR/DerivedTypes.h"
#include "llvm/IR/Function.h" #include "llvm/IR/Function.h"
#include "llvm/IR/GlobalVariable.h" #include "llvm/IR/GlobalVariable.h"
#include "llvm/IR/IRPrintingPasses.h"
#include "llvm/IR/InlineAsm.h" #include "llvm/IR/InlineAsm.h"
#include "llvm/IR/Instructions.h" #include "llvm/IR/Instructions.h"
#include "llvm/IR/LLVMContext.h" #include "llvm/IR/LLVMContext.h"
#include "llvm/IR/Module.h" #include "llvm/IR/Module.h"
#include "llvm/IR/PrintModulePass.h"
#include "llvm/Pass.h" #include "llvm/Pass.h"
#include "llvm/Support/MathExtras.h" #include "llvm/Support/MathExtras.h"
#include "llvm/Support/raw_ostream.h" #include "llvm/Support/raw_ostream.h"