Add functions that return instances of these printer passes
[oota-llvm.git] / lib / Analysis / CFGPrinter.cpp
index ac78970cc29db2a53f34b75bbbe37def20e1511a..3423e8be78c764c8fecbe4b377fcf2764ff58f4c 100644 (file)
@@ -22,6 +22,7 @@
 #include "llvm/Function.h"
 #include "llvm/iTerminators.h"
 #include "llvm/Assembly/Writer.h"
+#include "llvm/Analysis/CFGPrinter.h"
 #include "llvm/Support/CFG.h"
 #include <sstream>
 #include <fstream>
@@ -173,3 +174,12 @@ void Function::viewCFGOnly() const {
   viewCFG();
   CFGOnly = false;
 }
+
+FunctionPass *llvm::createCFGPrinterPass () {
+  return new CFGPrinter();
+}
+
+FunctionPass *llvm::createCFGOnlyPrinterPass () {
+  return new CFGOnlyPrinter();
+}
+