aboutsummaryrefslogtreecommitdiff
path: root/lib/VMCore
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2007-01-11 01:10:25 +0000
committerDevang Patel <dpatel@apple.com>2007-01-11 01:10:25 +0000
commit25919cb7802f2682b159a040ba07c5bd12b54efa (patch)
treed28ef35a0222e1a4b6f697c934b510769a24a0ff /lib/VMCore
parent65de742b8a1f561268ed62d5b101016ea40756f8 (diff)
Add PassManagerType enum.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33065 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore')
-rw-r--r--lib/VMCore/PassManager.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/VMCore/PassManager.cpp b/lib/VMCore/PassManager.cpp
index 62e453399b..00f08cac9e 100644
--- a/lib/VMCore/PassManager.cpp
+++ b/lib/VMCore/PassManager.cpp
@@ -291,6 +291,10 @@ public:
return PassVector.size();
}
+ virtual PassManagerType getPassManagerType() {
+ assert ( 0 && "Invalid use of getPassManagerType");
+ return PMT_Unknown;
+ }
protected:
// If a FunctionPass F is the last user of ModulePass info M
@@ -359,6 +363,10 @@ public:
BasicBlockPass *BP = static_cast<BasicBlockPass *>(PassVector[N]);
return BP;
}
+
+ virtual PassManagerType getPassManagerType() {
+ return PMT_BasicBlockPassManager;
+ }
};
//===----------------------------------------------------------------------===//
@@ -413,6 +421,9 @@ public:
return FP;
}
+ virtual PassManagerType getPassManagerType() {
+ return PMT_FunctionPassManager;
+ }
private:
// Active Pass Manager
BBPassManager *activeBBPassManager;
@@ -529,6 +540,7 @@ public:
return MP;
}
+ virtual PassManagerType getPassManagerType() { return PMT_ModulePassManager; }
private:
// Active Pass Manager
FPPassManager *activeFunctionPassManager;