summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/Analysis/CFGPrinter.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/Analysis/CFGPrinter.cpp b/lib/Analysis/CFGPrinter.cpp
index ac78970..3423e8b 100644
--- a/lib/Analysis/CFGPrinter.cpp
+++ b/lib/Analysis/CFGPrinter.cpp
@@ -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();
+}
+