From 8bf58bbc69e34191443e70a47f1d3b1ad188a7ec Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Tue, 23 Jul 2002 17:58:09 +0000 Subject: [PATCH] Regularize the Print*Passes so they have default ctors. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3006 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Assembly/PrintModulePass.h | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/include/llvm/Assembly/PrintModulePass.h b/include/llvm/Assembly/PrintModulePass.h index 7daea4c5791..08de60363f4 100644 --- a/include/llvm/Assembly/PrintModulePass.h +++ b/include/llvm/Assembly/PrintModulePass.h @@ -19,13 +19,12 @@ class PrintModulePass : public Pass { std::ostream *Out; // ostream to print on bool DeleteStream; // Delete the ostream in our dtor? public: - inline PrintModulePass(std::ostream *o = &std::cout, bool DS = false) + PrintModulePass() : Out(&std::cerr), DeleteStream(false) {} + PrintModulePass(std::ostream *o, bool DS = false) : Out(o), DeleteStream(DS) { } - const char *getPassName() const { return "Module Printer"; } - - inline ~PrintModulePass() { + ~PrintModulePass() { if (DeleteStream) delete Out; } @@ -44,13 +43,12 @@ class PrintFunctionPass : public FunctionPass { std::ostream *Out; // ostream to print on bool DeleteStream; // Delete the ostream in our dtor? public: - inline PrintFunctionPass(const std::string &B, std::ostream *o = &std::cout, - bool DS = false) + PrintFunctionPass() : Banner(""), Out(&std::cerr), DeleteStream(false) {} + PrintFunctionPass(const std::string &B, std::ostream *o = &std::cout, + bool DS = false) : Banner(B), Out(o), DeleteStream(DS) { } - const char *getPassName() const { return "Function Printer"; } - inline ~PrintFunctionPass() { if (DeleteStream) delete Out; }