Index: lib/IR/IRPrintingPasses.cpp =================================================================== --- lib/IR/IRPrintingPasses.cpp +++ lib/IR/IRPrintingPasses.cpp @@ -127,13 +127,13 @@ char PrintModulePassWrapper::ID = 0; INITIALIZE_PASS(PrintModulePassWrapper, "print-module", - "Print module to stderr", false, false) + "Print module to stderr", false, true) char PrintFunctionPassWrapper::ID = 0; INITIALIZE_PASS(PrintFunctionPassWrapper, "print-function", - "Print function to stderr", false, false) + "Print function to stderr", false, true) char PrintBasicBlockPass::ID = 0; INITIALIZE_PASS(PrintBasicBlockPass, "print-bb", "Print BB to stderr", false, - false) + true) ModulePass *llvm::createPrintModulePass(llvm::raw_ostream &OS, const std::string &Banner, Index: test/Other/printer.ll =================================================================== --- /dev/null +++ test/Other/printer.ll @@ -0,0 +1,13 @@ +; RUN: opt -mem2reg -instcombine -print-after-all -S < %s 2>&1 | FileCheck %s +define void @tester(){ + ret void +} + +define void @foo(){ + ret void +} + +;CHECK: IR Dump After Promote Memory to Register +;CHECK: IR Dump After Combine redundant instructions +;CHECK: IR Dump After Module Verifier +;CHECK-NOT: IR Dump After Print Module IR