Do not use typeinfo to identify pass in pass manager.
llvm-svn: 36632
diff --git a/llvm/lib/Transforms/Scalar/GCSE.cpp b/llvm/lib/Transforms/Scalar/GCSE.cpp
index f4727d4..bf84c93 100644
--- a/llvm/lib/Transforms/Scalar/GCSE.cpp
+++ b/llvm/lib/Transforms/Scalar/GCSE.cpp
@@ -37,6 +37,9 @@
"with constant values");
namespace {
struct VISIBILITY_HIDDEN GCSE : public FunctionPass {
+ static const int ID; // Pass identifcation, replacement for typeid
+ GCSE() : FunctionPass((intptr_t)&ID) {}
+
virtual bool runOnFunction(Function &F);
private:
@@ -51,6 +54,7 @@
}
};
+ const int GCSE::ID = 0;
RegisterPass<GCSE> X("gcse", "Global Common Subexpression Elimination");
}