diff options
author | Chris Lattner <sabre@nondot.org> | 2002-07-23 17:58:09 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2002-07-23 17:58:09 +0000 |
commit | 8bf58bbc69e34191443e70a47f1d3b1ad188a7ec (patch) | |
tree | d5647ece410211107907d3b73cb39b9411f75ae6 /include/llvm/Assembly | |
parent | c1b5d092a0f89db5356ae79d8cc4213118f230dd (diff) | |
download | external_llvm-8bf58bbc69e34191443e70a47f1d3b1ad188a7ec.zip external_llvm-8bf58bbc69e34191443e70a47f1d3b1ad188a7ec.tar.gz external_llvm-8bf58bbc69e34191443e70a47f1d3b1ad188a7ec.tar.bz2 |
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
Diffstat (limited to 'include/llvm/Assembly')
-rw-r--r-- | include/llvm/Assembly/PrintModulePass.h | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/include/llvm/Assembly/PrintModulePass.h b/include/llvm/Assembly/PrintModulePass.h index 7daea4c..08de603 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; } |