aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/Pass.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/Pass.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/Pass.h')
-rw-r--r--include/llvm/Pass.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/include/llvm/Pass.h b/include/llvm/Pass.h
index bd040b9..3c89130 100644
--- a/include/llvm/Pass.h
+++ b/include/llvm/Pass.h
@@ -41,6 +41,11 @@ public:
inline Pass(AnalysisResolver *AR = 0) : Resolver(AR) {}
inline virtual ~Pass() {} // Destructor is virtual so we can be subclassed
+ // getPassName - Return a nice clean name for a pass. This should be
+ // overloaded by the pass, but if it is not, C++ RTTI will be consulted to get
+ // a SOMEWHAT intelligable name for the pass.
+ //
+ virtual const char *getPassName() const;
// run - Run this pass, returning true if a modification was made to the
// module argument. This should be implemented by all concrete subclasses.
@@ -312,6 +317,4 @@ protected:
void setAnalysisResolver(Pass *P, AnalysisResolver *AR);
};
-
-
#endif