Regularize the Print*Passes so they have default ctors.
authorChris Lattner <sabre@nondot.org>
Tue, 23 Jul 2002 17:58:09 +0000 (17:58 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 23 Jul 2002 17:58:09 +0000 (17:58 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3006 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Assembly/PrintModulePass.h

index 7daea4c57919d6fad7458d3ee5dbfa0cbf6745be..08de60363f48bb62623b6ecd0033dbca3b382e31 100644 (file)
@@ -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;
   }