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
diff --git a/lib/Transforms/Scalar/ConstantProp.cpp b/lib/Transforms/Scalar/ConstantProp.cpp
index a8dbe3f..77a9599 100644
--- a/lib/Transforms/Scalar/ConstantProp.cpp
+++ b/lib/Transforms/Scalar/ConstantProp.cpp
@@ -211,6 +211,8 @@
namespace {
struct ConstantPropogation : public FunctionPass {
+ const char *getPassName() const { return "Simple Constant Propogation"; }
+
inline bool runOnFunction(Function *F) {
bool Modified = false;