diff options
author | Devang Patel <dpatel@apple.com> | 2006-12-07 21:27:23 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2006-12-07 21:27:23 +0000 |
commit | eb0d613ef6755f93610e08534a203c41ec14b56a (patch) | |
tree | cba485ee7b3f8113c57ac5408151fda4d33d1aca | |
parent | 1209f416cf2f2ec0f335d91a7c115e3b0a37d603 (diff) |
Now FunctionPassManagerImpl_New and PassManagerImpl_New derives from
PMTopLevelManager.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32325 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/VMCore/PassManager.cpp | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/lib/VMCore/PassManager.cpp b/lib/VMCore/PassManager.cpp index c0aeaa2046..dfcfcf89d2 100644 --- a/lib/VMCore/PassManager.cpp +++ b/lib/VMCore/PassManager.cpp @@ -327,8 +327,9 @@ private: /// It batches all function passes and basic block pass managers together and /// sequence them to process one function at a time before processing next /// function. -class FunctionPassManagerImpl_New : public PMDataManager, - public ModulePass { +class FunctionPassManagerImpl_New : public ModulePass, + public PMDataManager, + public PMTopLevelManager { public: FunctionPassManagerImpl_New(ModuleProvider *P) { /* TODO */ } FunctionPassManagerImpl_New() { @@ -336,6 +337,10 @@ public: } ~FunctionPassManagerImpl_New() { /* TODO */ }; + inline void addTopLevelPass(Pass *P) { + addPass(P); + } + /// add - Add a pass to the queue of passes to run. This passes /// ownership of the Pass to the PassManager. When the /// PassManager_X is destroyed, the pass will be destroyed as well, so @@ -402,7 +407,8 @@ private: }; /// PassManager_New manages ModulePassManagers -class PassManagerImpl_New : public PMDataManager { +class PassManagerImpl_New : public PMDataManager, + public PMTopLevelManager { public: @@ -424,6 +430,10 @@ public: Info.setPreservesAll(); } + inline void addTopLevelPass(Pass *P) { + addPass(P); + } + private: /// Add a pass into a passmanager queue. |