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/Scalar/GCSE.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'llvm/lib/Transforms/Scalar/GCSE.cpp') diff --git a/llvm/lib/Transforms/Scalar/GCSE.cpp b/llvm/lib/Transforms/Scalar/GCSE.cpp index f4727d4e303..bf84c937ace 100644 --- a/llvm/lib/Transforms/Scalar/GCSE.cpp +++ b/llvm/lib/Transforms/Scalar/GCSE.cpp @@ -37,6 +37,9 @@ STATISTIC(NumArgsRepl , "Number of function arguments replaced " "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 @@ namespace { } }; + const int GCSE::ID = 0; RegisterPass X("gcse", "Global Common Subexpression Elimination"); } -- cgit v1.2.3