Do not use typeinfo to identify pass in pass manager.
llvm-svn: 36632
diff --git a/llvm/lib/Transforms/Utils/Mem2Reg.cpp b/llvm/lib/Transforms/Utils/Mem2Reg.cpp
index 7d69fd2..37bc318 100644
--- a/llvm/lib/Transforms/Utils/Mem2Reg.cpp
+++ b/llvm/lib/Transforms/Utils/Mem2Reg.cpp
@@ -27,6 +27,9 @@
namespace {
struct VISIBILITY_HIDDEN PromotePass : public FunctionPass {
+ static const int ID; // Pass identifcation, replacement for typeid
+ PromotePass() : FunctionPass((intptr_t)&ID) {}
+
// runOnFunction - To run this pass, first we calculate the alloca
// instructions that are safe for promotion, then we promote each one.
//
@@ -47,6 +50,7 @@
}
};
+ const int PromotePass::ID = 0;
RegisterPass<PromotePass> X("mem2reg", "Promote Memory to Register");
} // end of anonymous namespace