1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-01-31 20:51:52 +01:00

Regularize the Print*Passes so they have default ctors.

llvm-svn: 3006
This commit is contained in:
Chris Lattner 2002-07-23 17:58:09 +00:00
parent 585a05d786
commit a9de1268be

View 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;
}