diff options
author | Chris Lattner <sabre@nondot.org> | 2004-09-20 04:48:05 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2004-09-20 04:48:05 +0000 |
commit | b12914bfc0f76a7a48357162d5f4c39a1343e69b (patch) | |
tree | 00bff0412482165a6d7d60775e4aeb6ebe3b4628 /lib/Target/SparcV9/EmitBytecodeToAssembly.cpp | |
parent | bba61c07ddca19f72b13dd5a410358d296ed1d6a (diff) |
'Pass' should now not be derived from by clients. Instead, they should derive
from ModulePass. Instead of implementing Pass::run, then should implement
ModulePass::runOnModule.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16436 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/SparcV9/EmitBytecodeToAssembly.cpp')
-rw-r--r-- | lib/Target/SparcV9/EmitBytecodeToAssembly.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/lib/Target/SparcV9/EmitBytecodeToAssembly.cpp b/lib/Target/SparcV9/EmitBytecodeToAssembly.cpp index 0826f76284..26332ca301 100644 --- a/lib/Target/SparcV9/EmitBytecodeToAssembly.cpp +++ b/lib/Target/SparcV9/EmitBytecodeToAssembly.cpp @@ -17,10 +17,7 @@ #include "llvm/Pass.h" #include "llvm/Bytecode/Writer.h" #include <iostream> - -namespace llvm { - -using std::ostream; +using namespace llvm; namespace { @@ -87,14 +84,14 @@ namespace { } // SparcV9BytecodeWriter - Write bytecode out to a stream that is sparc'ified - class SparcV9BytecodeWriter : public Pass { + class SparcV9BytecodeWriter : public ModulePass { std::ostream &Out; public: SparcV9BytecodeWriter(std::ostream &out) : Out(out) {} const char *getPassName() const { return "Emit Bytecode to SparcV9 Assembly";} - virtual bool run(Module &M) { + virtual bool runOnModule(Module &M) { // Write an object containing the bytecode to the SPARC assembly stream writePrologue (Out, "LLVM BYTECODE OUTPUT", "LLVMBytecode"); osparcasmstream OS(Out); @@ -112,8 +109,7 @@ namespace { }; } // end anonymous namespace -Pass *createBytecodeAsmPrinterPass(std::ostream &Out) { +ModulePass *llvm::createBytecodeAsmPrinterPass(std::ostream &Out) { return new SparcV9BytecodeWriter(Out); } -} // End llvm namespace |