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 | 794fd75c67a2cdc128d67342c6d88a504d186896 (patch) | |
tree | 6b805aa4a576e9de6cbf096d2fb85063b3fb8fca /lib/Target/MSIL | |
parent | e50fb9ac174b791047ffa8648443ab94b2097cd9 (diff) | |
download | llvm-794fd75c67a2cdc128d67342c6d88a504d186896.tar.gz llvm-794fd75c67a2cdc128d67342c6d88a504d186896.tar.bz2 llvm-794fd75c67a2cdc128d67342c6d88a504d186896.tar.xz |
Do not use typeinfo to identify pass in pass manager.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36632 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/MSIL')
-rw-r--r-- | lib/Target/MSIL/MSILWriter.cpp | 2 | ||||
-rw-r--r-- | lib/Target/MSIL/MSILWriter.h | 7 |
2 files changed, 6 insertions, 3 deletions
diff --git a/lib/Target/MSIL/MSILWriter.cpp b/lib/Target/MSIL/MSILWriter.cpp index 55eb03c7d0..86bea59db4 100644 --- a/lib/Target/MSIL/MSILWriter.cpp +++ b/lib/Target/MSIL/MSILWriter.cpp @@ -80,6 +80,8 @@ bool MSILModule::runOnModule(Module &M) { return Changed; } +const int MSILModule::ID = 0; +const int MSILWriter::ID = 0; bool MSILWriter::runOnFunction(Function &F) { if (F.isDeclaration()) return false; diff --git a/lib/Target/MSIL/MSILWriter.h b/lib/Target/MSIL/MSILWriter.h index 7fa039e3d9..15a463d73d 100644 --- a/lib/Target/MSIL/MSILWriter.h +++ b/lib/Target/MSIL/MSILWriter.h @@ -37,9 +37,10 @@ namespace { const TargetData*& TD; public: + static const int ID; MSILModule(const std::set<const Type *>*& _UsedTypes, const TargetData*& _TD) - : UsedTypes(_UsedTypes), TD(_TD) {} + : ModulePass((intptr_t)&ID), UsedTypes(_UsedTypes), TD(_TD) {} void getAnalysisUsage(AnalysisUsage &AU) const { AU.addRequired<FindUsedTypes>(); @@ -82,8 +83,8 @@ namespace { std::map<const GlobalVariable*,std::vector<StaticInitializer> > StaticInitList; const std::set<const Type *>* UsedTypes; - - MSILWriter(std::ostream &o) : Out(o) { + static const int ID; + MSILWriter(std::ostream &o) : FunctionPass((intptr_t)&ID), Out(o) { UniqID = 0; } |