aboutsummaryrefslogtreecommitdiff
path: root/lib/Transforms/Instrumentation/BlockProfiling.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Transforms/Instrumentation/BlockProfiling.cpp')
-rw-r--r--lib/Transforms/Instrumentation/BlockProfiling.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/Transforms/Instrumentation/BlockProfiling.cpp b/lib/Transforms/Instrumentation/BlockProfiling.cpp
index f22f81feef..ef1df23e8b 100644
--- a/lib/Transforms/Instrumentation/BlockProfiling.cpp
+++ b/lib/Transforms/Instrumentation/BlockProfiling.cpp
@@ -23,6 +23,7 @@
#include "llvm/DerivedTypes.h"
#include "llvm/Module.h"
#include "llvm/Pass.h"
+#include "llvm/Transforms/Instrumentation.h"
#include "ProfilingUtils.h"
#include <iostream>
@@ -37,6 +38,11 @@ namespace {
"Insert instrumentation for function profiling");
}
+ModulePass *llvm::createFunctionProfilerPass()
+{
+ return new FunctionProfiler();
+}
+
bool FunctionProfiler::runOnModule(Module &M) {
Function *Main = M.getMainFunction();
if (Main == 0) {
@@ -77,6 +83,8 @@ namespace {
"Insert instrumentation for block profiling");
}
+ModulePass *llvm::createBlockProfilerPass() { return new BlockProfiler(); }
+
bool BlockProfiler::runOnModule(Module &M) {
Function *Main = M.getMainFunction();
if (Main == 0) {