diff options
author | Chris Lattner <sabre@nondot.org> | 2004-09-20 04:48:05 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2004-09-20 04:48:05 +0000 |
commit | b12914bfc0f76a7a48357162d5f4c39a1343e69b (patch) | |
tree | 00bff0412482165a6d7d60775e4aeb6ebe3b4628 /lib/VMCore/PassManagerT.h | |
parent | bba61c07ddca19f72b13dd5a410358d296ed1d6a (diff) | |
download | external_llvm-b12914bfc0f76a7a48357162d5f4c39a1343e69b.zip external_llvm-b12914bfc0f76a7a48357162d5f4c39a1343e69b.tar.gz external_llvm-b12914bfc0f76a7a48357162d5f4c39a1343e69b.tar.bz2 |
'Pass' should now not be derived from by clients. Instead, they should derive
from ModulePass. Instead of implementing Pass::run, then should implement
ModulePass::runOnModule.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16436 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/PassManagerT.h')
-rw-r--r-- | lib/VMCore/PassManagerT.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/VMCore/PassManagerT.h b/lib/VMCore/PassManagerT.h index 95e0f56..1d8267f 100644 --- a/lib/VMCore/PassManagerT.h +++ b/lib/VMCore/PassManagerT.h @@ -726,9 +726,9 @@ template<> struct PassManagerTraits<Function> : public FunctionPass { // // This is the top level PassManager implementation that holds generic passes. // -template<> struct PassManagerTraits<Module> : public Pass { +template<> struct PassManagerTraits<Module> : public ModulePass { // PassClass - The type of passes tracked by this PassManager - typedef Pass PassClass; + typedef ModulePass PassClass; // SubPassClass - The types of classes that should be collated together typedef FunctionPass SubPassClass; @@ -740,15 +740,15 @@ template<> struct PassManagerTraits<Module> : public Pass { typedef AnalysisResolver ParentClass; // runPass - Specify how the pass should be run on the UnitType - static bool runPass(PassClass *P, Module *M) { return P->run(*M); } + static bool runPass(PassClass *P, Module *M) { return P->runOnModule(*M); } // getPMName() - Return the name of the unit the PassManager operates on for // debugging. const char *getPMName() const { return "Module"; } virtual const char *getPassName() const { return "Module Pass Manager"; } - // run - Implement the PassManager interface... - bool run(Module &M) { + // runOnModule - Implement the PassManager interface. + bool runOnModule(Module &M) { return ((PassManagerT<Module>*)this)->runOnUnit(&M); } }; |