Add new optional getPassName() virtual function that a Pass can override
to make debugging output a lot nicer.
llvm-svn: 2395
diff --git a/llvm/lib/Target/Sparc/EmitBytecodeToAssembly.cpp b/llvm/lib/Target/Sparc/EmitBytecodeToAssembly.cpp
index 92420f9..fdf8f3e 100644
--- a/llvm/lib/Target/Sparc/EmitBytecodeToAssembly.cpp
+++ b/llvm/lib/Target/Sparc/EmitBytecodeToAssembly.cpp
@@ -59,6 +59,8 @@
public:
SparcBytecodeWriter(std::ostream &out) : Out(out) {}
+ const char *getPassName() const { return "Emit Bytecode to Sparc Assembly";}
+
virtual bool run(Module *M) {
// Write bytecode out to the sparc assembly stream
Out << "\n\n!LLVM BYTECODE OUTPUT\n\t.section \".rodata\"\n\t.align 8\n";