Now that hopefully all direct accesses to InvokeInst operands are fixed
[oota-llvm.git] / lib / Analysis / PostDominators.cpp
index c72b140a6224fec085d184253846e1dd8bd88d7f..c38e0503f931d25bc9ae725f6a567f6ad2c214ee 100644 (file)
@@ -33,15 +33,23 @@ F("postdomtree", "Post-Dominator Tree Construction", true, true);
 
 bool PostDominatorTree::runOnFunction(Function &F) {
   DT->recalculate(F);
-  DEBUG(DT->dump());
+  DEBUG(DT->print(dbgs()));
   return false;
 }
 
-PostDominatorTree::~PostDominatorTree()
-{
+PostDominatorTree::~PostDominatorTree() {
   delete DT;
 }
 
+void PostDominatorTree::print(raw_ostream &OS, const Module *) const {
+  DT->print(OS);
+}
+
+
+FunctionPass* llvm::createPostDomTree() {
+  return new PostDominatorTree();
+}
+
 //===----------------------------------------------------------------------===//
 //  PostDominanceFrontier Implementation
 //===----------------------------------------------------------------------===//
@@ -85,5 +93,6 @@ PostDominanceFrontier::calculate(const PostDominatorTree &DT,
   return S;
 }
 
-// Ensure that this .cpp file gets linked when PostDominators.h is used.
-DEFINING_FILE_FOR(PostDominanceFrontier)
+FunctionPass* llvm::createPostDomFrontier() {
+  return new PostDominanceFrontier();
+}