mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-06 06:33:24 +00:00
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
This commit is contained in:
parent
c1b5d092a0
commit
8bf58bbc69
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user