From 09f162ca6a10446d6377b957f3a58ac92ce38306 Mon Sep 17 00:00:00 2001 From: Devang Patel Date: Tue, 1 May 2007 21:15:47 +0000 Subject: Do not use typeinfo to identify pass in pass manager. llvm-svn: 36632 --- llvm/lib/Transforms/Utils/Mem2Reg.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'llvm/lib/Transforms/Utils/Mem2Reg.cpp') 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 @@ STATISTIC(NumPromoted, "Number of alloca's promoted"); 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 @@ namespace { } }; + const int PromotePass::ID = 0; RegisterPass X("mem2reg", "Promote Memory to Register"); } // end of anonymous namespace -- cgit v1.1