diff options
author | Chris Lattner <sabre@nondot.org> | 2002-04-29 14:57:45 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2002-04-29 14:57:45 +0000 |
commit | 37104aace8a7f5ed8e11e905aeaf579b526e3b8e (patch) | |
tree | c6f7dcb73419953abda386a20b175d1f83f2b050 /llvm/lib/Target/Sparc/EmitAssembly.cpp | |
parent | e2eb99eb6215eb1d3dc78b1e20192ca6221d7d5f (diff) | |
download | bcm5719-llvm-37104aace8a7f5ed8e11e905aeaf579b526e3b8e.tar.gz bcm5719-llvm-37104aace8a7f5ed8e11e905aeaf579b526e3b8e.zip |
Add new optional getPassName() virtual function that a Pass can override
to make debugging output a lot nicer.
llvm-svn: 2395
Diffstat (limited to 'llvm/lib/Target/Sparc/EmitAssembly.cpp')
-rw-r--r-- | llvm/lib/Target/Sparc/EmitAssembly.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/Target/Sparc/EmitAssembly.cpp b/llvm/lib/Target/Sparc/EmitAssembly.cpp index f4ca22f9da9..8d87bfec6be 100644 --- a/llvm/lib/Target/Sparc/EmitAssembly.cpp +++ b/llvm/lib/Target/Sparc/EmitAssembly.cpp @@ -192,6 +192,10 @@ struct SparcFunctionAsmPrinter : public FunctionPass, public AsmPrinter { inline SparcFunctionAsmPrinter(std::ostream &os, const TargetMachine &t) : AsmPrinter(os, t) {} + const char *getPassName() const { + return "Output Sparc Assembly for Functions"; + } + virtual bool doInitialization(Module *M) { startModule(M); return false; @@ -424,6 +428,8 @@ public: SparcModuleAsmPrinter(std::ostream &os, TargetMachine &t) : AsmPrinter(os, t) {} + const char *getPassName() const { return "Output Sparc Assembly for Module"; } + virtual bool run(Module *M) { startModule(M); emitGlobalsAndConstants(M); |