summaryrefslogtreecommitdiffstats
path: root/include/llvm/Assembly/PrintModulePass.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-04-29 14:57:45 +0000
committerChris Lattner <sabre@nondot.org>2002-04-29 14:57:45 +0000
commit96c466b06ab0c830b07329c1b16037f585ccbe40 (patch)
treee07bbfb58ede2e61ef3243a083dbe5da3b47d712 /include/llvm/Assembly/PrintModulePass.h
parent691fa3cfb12f459b953dd400057841b10ccf4b72 (diff)
downloadexternal_llvm-96c466b06ab0c830b07329c1b16037f585ccbe40.zip
external_llvm-96c466b06ab0c830b07329c1b16037f585ccbe40.tar.gz
external_llvm-96c466b06ab0c830b07329c1b16037f585ccbe40.tar.bz2
Add new optional getPassName() virtual function that a Pass can override
to make debugging output a lot nicer. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2395 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Assembly/PrintModulePass.h')
-rw-r--r--include/llvm/Assembly/PrintModulePass.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/llvm/Assembly/PrintModulePass.h b/include/llvm/Assembly/PrintModulePass.h
index 2d63e6d..83cd852 100644
--- a/include/llvm/Assembly/PrintModulePass.h
+++ b/include/llvm/Assembly/PrintModulePass.h
@@ -22,6 +22,8 @@ public:
inline PrintModulePass(std::ostream *o = &std::cout, bool DS = false)
: Out(o), DeleteStream(DS) {
}
+
+ const char *getPassName() const { return "Module Printer"; }
inline ~PrintModulePass() {
if (DeleteStream) delete Out;
@@ -46,6 +48,8 @@ public:
bool DS = false)
: Banner(B), Out(o), DeleteStream(DS) {
}
+
+ const char *getPassName() const { return "Function Printer"; }
inline ~PrintFunctionPass() {
if (DeleteStream) delete Out;