Do not use typeinfo to identify pass in pass manager.
llvm-svn: 36632
diff --git a/llvm/lib/Transforms/Scalar/LICM.cpp b/llvm/lib/Transforms/Scalar/LICM.cpp
index f367973..6a16243 100644
--- a/llvm/lib/Transforms/Scalar/LICM.cpp
+++ b/llvm/lib/Transforms/Scalar/LICM.cpp
@@ -63,6 +63,9 @@
cl::desc("Disable memory promotion in LICM pass"));
struct VISIBILITY_HIDDEN LICM : public LoopPass {
+ static const int ID; // Pass identifcation, replacement for typeid
+ LICM() : LoopPass((intptr_t)&ID) {}
+
virtual bool runOnLoop(Loop *L, LPPassManager &LPM);
/// This transformation requires natural loop information & requires that
@@ -201,6 +204,7 @@
std::map<Value*, AllocaInst*> &Val2AlMap);
};
+ const int LICM::ID = 0;
RegisterPass<LICM> X("licm", "Loop Invariant Code Motion");
}