Do not use typeinfo to identify pass in pass manager.
llvm-svn: 36632
diff --git a/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp b/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp
index aad6cc9..313f811 100644
--- a/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp
+++ b/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp
@@ -68,7 +68,10 @@
ScalarEvolution *SE;
bool Changed;
public:
-
+
+ static const int ID; // Pass identifcation, replacement for typeid
+ IndVarSimplify() : LoopPass((intptr_t)&ID) {}
+
bool runOnLoop(Loop *L, LPPassManager &LPM);
bool doInitialization(Loop *L, LPPassManager &LPM);
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
@@ -91,6 +94,8 @@
void DeleteTriviallyDeadInstructions(std::set<Instruction*> &Insts);
};
+
+ const int IndVarSimplify::ID = 0;
RegisterPass<IndVarSimplify> X("indvars", "Canonicalize Induction Variables");
}