aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/Analysis/PostDominators.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/Analysis/PostDominators.h')
-rw-r--r--include/llvm/Analysis/PostDominators.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/include/llvm/Analysis/PostDominators.h b/include/llvm/Analysis/PostDominators.h
index 359f19daf8..793c7f4889 100644
--- a/include/llvm/Analysis/PostDominators.h
+++ b/include/llvm/Analysis/PostDominators.h
@@ -22,7 +22,10 @@ namespace llvm {
/// compute the a post-dominator tree.
///
struct PostDominatorTree : public DominatorTreeBase {
- PostDominatorTree() : DominatorTreeBase(true) {}
+ static const int ID; // Pass identifcation, replacement for typeid
+
+ PostDominatorTree() :
+ DominatorTreeBase((intptr_t)&ID, true) {}
virtual bool runOnFunction(Function &F) {
reset(); // Reset from the last time we were run...
@@ -51,7 +54,8 @@ private:
/// PostETForest Class - Concrete subclass of ETForestBase that is used to
/// compute a forwards post-dominator ET-Forest.
struct PostETForest : public ETForestBase {
- PostETForest() : ETForestBase(true) {}
+ static const int ID;
+ PostETForest() : ETForestBase((intptr_t)&ID, true) {}
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
AU.setPreservesAll();
@@ -75,7 +79,9 @@ struct PostETForest : public ETForestBase {
/// used to compute the a post-dominance frontier.
///
struct PostDominanceFrontier : public DominanceFrontierBase {
- PostDominanceFrontier() : DominanceFrontierBase(true) {}
+ static const int ID;
+ PostDominanceFrontier()
+ : DominanceFrontierBase((intptr_t) &ID, true) {}
virtual bool runOnFunction(Function &) {
Frontiers.clear();