diff options
author | Devang Patel <dpatel@apple.com> | 2007-05-01 21:15:47 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2007-05-01 21:15:47 +0000 |
commit | 09f162ca6a10446d6377b957f3a58ac92ce38306 (patch) | |
tree | b41e816449956582e447ab616707e1afbf1a88fe /llvm/lib/Transforms/Scalar/SCCP.cpp | |
parent | a612049dd849d1e659eeaeefbcf82147af7f669f (diff) | |
download | bcm5719-llvm-09f162ca6a10446d6377b957f3a58ac92ce38306.tar.gz bcm5719-llvm-09f162ca6a10446d6377b957f3a58ac92ce38306.zip |
Do not use typeinfo to identify pass in pass manager.
llvm-svn: 36632
Diffstat (limited to 'llvm/lib/Transforms/Scalar/SCCP.cpp')
-rw-r--r-- | llvm/lib/Transforms/Scalar/SCCP.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/Scalar/SCCP.cpp b/llvm/lib/Transforms/Scalar/SCCP.cpp index 16e7a8e269b..4ead2757b47 100644 --- a/llvm/lib/Transforms/Scalar/SCCP.cpp +++ b/llvm/lib/Transforms/Scalar/SCCP.cpp @@ -1334,6 +1334,9 @@ namespace { /// Sparse Conditional Constant Propagator. /// struct VISIBILITY_HIDDEN SCCP : public FunctionPass { + static const int ID; // Pass identifcation, replacement for typeid + SCCP() : FunctionPass((intptr_t)&ID) {} + // runOnFunction - Run the Sparse Conditional Constant Propagation // algorithm, and return true if the function was modified. // @@ -1344,6 +1347,7 @@ namespace { } }; + const int SCCP::ID = 0; RegisterPass<SCCP> X("sccp", "Sparse Conditional Constant Propagation"); } // end anonymous namespace @@ -1443,9 +1447,12 @@ namespace { /// Constant Propagation. /// struct VISIBILITY_HIDDEN IPSCCP : public ModulePass { + static const int ID; + IPSCCP() : ModulePass((intptr_t)&ID) {} bool runOnModule(Module &M); }; + const int IPSCCP::ID = 0; RegisterPass<IPSCCP> Y("ipsccp", "Interprocedural Sparse Conditional Constant Propagation"); } // end anonymous namespace |