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/VMCore/Verifier.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/VMCore/Verifier.cpp')
| -rw-r--r-- | llvm/lib/VMCore/Verifier.cpp | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/llvm/lib/VMCore/Verifier.cpp b/llvm/lib/VMCore/Verifier.cpp index 8e632e2f8da..94027f858fe 100644 --- a/llvm/lib/VMCore/Verifier.cpp +++ b/llvm/lib/VMCore/Verifier.cpp @@ -69,6 +69,7 @@ namespace { // Anonymous namespace for class struct VISIBILITY_HIDDEN Verifier : public FunctionPass, InstVisitor<Verifier> { + static const int ID; // Pass ID, replacement for typeid bool Broken; // Is this module found to be broken? bool RealPass; // Are we not being run by a PassManager? VerifierFailureAction action; @@ -84,18 +85,22 @@ namespace { // Anonymous namespace for class SmallPtrSet<Instruction*, 16> InstsInThisBlock; Verifier() - : Broken(false), RealPass(true), action(AbortProcessAction), - EF(0), msgs( std::ios::app | std::ios::out ) {} + : FunctionPass((intptr_t)&ID), + Broken(false), RealPass(true), action(AbortProcessAction), + EF(0), msgs( std::ios::app | std::ios::out ) {} Verifier( VerifierFailureAction ctn ) - : Broken(false), RealPass(true), action(ctn), EF(0), - msgs( std::ios::app | std::ios::out ) {} + : FunctionPass((intptr_t)&ID), + Broken(false), RealPass(true), action(ctn), EF(0), + msgs( std::ios::app | std::ios::out ) {} Verifier(bool AB ) - : Broken(false), RealPass(true), - action( AB ? AbortProcessAction : PrintMessageAction), EF(0), - msgs( std::ios::app | std::ios::out ) {} + : FunctionPass((intptr_t)&ID), + Broken(false), RealPass(true), + action( AB ? AbortProcessAction : PrintMessageAction), EF(0), + msgs( std::ios::app | std::ios::out ) {} Verifier(ETForest &ef) - : Broken(false), RealPass(false), action(PrintMessageAction), - EF(&ef), msgs( std::ios::app | std::ios::out ) {} + : FunctionPass((intptr_t)&ID), + Broken(false), RealPass(false), action(PrintMessageAction), + EF(&ef), msgs( std::ios::app | std::ios::out ) {} bool doInitialization(Module &M) { @@ -261,6 +266,7 @@ namespace { // Anonymous namespace for class } }; + const int Verifier::ID = 0; RegisterPass<Verifier> X("verify", "Module Verifier"); } // End anonymous namespace |

