Do not use typeinfo to identify pass in pass manager.
llvm-svn: 36632
diff --git a/llvm/lib/Transforms/Scalar/CondPropagate.cpp b/llvm/lib/Transforms/Scalar/CondPropagate.cpp
index 90a4f30..4f41b1b 100644
--- a/llvm/lib/Transforms/Scalar/CondPropagate.cpp
+++ b/llvm/lib/Transforms/Scalar/CondPropagate.cpp
@@ -31,6 +31,9 @@
namespace {
struct VISIBILITY_HIDDEN CondProp : public FunctionPass {
+ static const int ID; // Pass identifcation, replacement for typeid
+ CondProp() : FunctionPass((intptr_t)&ID) {}
+
virtual bool runOnFunction(Function &F);
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
@@ -45,6 +48,8 @@
void SimplifyPredecessors(SwitchInst *SI);
void RevectorBlockTo(BasicBlock *FromBB, BasicBlock *ToBB);
};
+
+ const int CondProp::ID = 0;
RegisterPass<CondProp> X("condprop", "Conditional Propagation");
}