mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-14 11:32:34 +00:00
Add a version of the bytecode writer pass that has a default ctor
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3031 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
3c19b92389
commit
28fe8ce18f
@ -16,12 +16,11 @@ class WriteBytecodePass : public Pass {
|
||||
std::ostream *Out; // ostream to print on
|
||||
bool DeleteStream;
|
||||
public:
|
||||
inline WriteBytecodePass(std::ostream *o = &std::cout, bool DS = false)
|
||||
WriteBytecodePass() : Out(&std::cout), DeleteStream(false) {}
|
||||
WriteBytecodePass(std::ostream *o, bool DS = false)
|
||||
: Out(o), DeleteStream(DS) {
|
||||
}
|
||||
|
||||
const char *getPassName() const { return "Bytecode Writer"; }
|
||||
|
||||
inline ~WriteBytecodePass() {
|
||||
if (DeleteStream) delete Out;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user