Convert debug messages to use dbgs(). Generally this means
[oota-llvm.git] / lib / Analysis / PostDominators.cpp
index cfa1b463295e3c219743e65b2a2f8e878d9d51b1..69d6b47bbee49cd42264edce511ea2680e2a94e6 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(errs()));
   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
 //===----------------------------------------------------------------------===//
@@ -84,3 +92,7 @@ PostDominanceFrontier::calculate(const PostDominatorTree &DT,
 
   return S;
 }
+
+FunctionPass* llvm::createPostDomFrontier() {
+  return new PostDominanceFrontier();
+}