Add missing createXxxPass functions


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19319 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Transforms/Instrumentation/BlockProfiling.cpp b/lib/Transforms/Instrumentation/BlockProfiling.cpp
index f22f81f..ef1df23 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 @@
                                "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 @@
                                "Insert instrumentation for block profiling");
 }
 
+ModulePass *llvm::createBlockProfilerPass() { return new BlockProfiler(); }
+
 bool BlockProfiler::runOnModule(Module &M) {
   Function *Main = M.getMainFunction();
   if (Main == 0) {
diff --git a/lib/Transforms/Instrumentation/EdgeProfiling.cpp b/lib/Transforms/Instrumentation/EdgeProfiling.cpp
index 89c540c..c453554 100644
--- a/lib/Transforms/Instrumentation/EdgeProfiling.cpp
+++ b/lib/Transforms/Instrumentation/EdgeProfiling.cpp
@@ -22,6 +22,7 @@
 #include "llvm/Module.h"
 #include "llvm/Pass.h"
 #include "llvm/Transforms/Utils/BasicBlockUtils.h"
+#include "llvm/Transforms/Instrumentation.h"
 #include "ProfilingUtils.h"
 #include <iostream>
 #include <set>
@@ -36,6 +37,8 @@
                               "Insert instrumentation for edge profiling");
 }
 
+ModulePass *llvm::createEdgeProfilerPass() { return new EdgeProfiler(); }
+
 bool EdgeProfiler::runOnModule(Module &M) {
   Function *Main = M.getMainFunction();
   if (Main == 0) {
diff --git a/lib/Transforms/Instrumentation/ProfilePaths/ProfilePaths.cpp b/lib/Transforms/Instrumentation/ProfilePaths/ProfilePaths.cpp
index aa0723b..cc14c268 100644
--- a/lib/Transforms/Instrumentation/ProfilePaths/ProfilePaths.cpp
+++ b/lib/Transforms/Instrumentation/ProfilePaths/ProfilePaths.cpp
@@ -31,6 +31,7 @@
 //
 //===----------------------------------------------------------------------===//
 
+#include "llvm/Transforms/Instrumentation.h"
 #include "llvm/Transforms/Utils/UnifyFunctionExitNodes.h"
 #include "llvm/Support/CFG.h"
 #include "llvm/Constants.h"
@@ -56,6 +57,8 @@
 
 static RegisterOpt<ProfilePaths> X("paths", "Profile Paths");
 
+FunctionPass *createProfilePathsPass() { return new ProfilePaths(); }
+
 static Node *findBB(std::vector<Node *> &st, BasicBlock *BB){
   for(std::vector<Node *>::iterator si=st.begin(); si!=st.end(); ++si){
     if(((*si)->getElement())==BB){
diff --git a/lib/Transforms/Instrumentation/TraceBasicBlocks.cpp b/lib/Transforms/Instrumentation/TraceBasicBlocks.cpp
index 746e822..68d50ae 100644
--- a/lib/Transforms/Instrumentation/TraceBasicBlocks.cpp
+++ b/lib/Transforms/Instrumentation/TraceBasicBlocks.cpp
@@ -18,6 +18,7 @@
 #include "llvm/Module.h"
 #include "llvm/Pass.h"
 #include "llvm/Transforms/Utils/BasicBlockUtils.h"
+#include "llvm/Transforms/Instrumentation.h"
 #include "llvm/Instructions.h"
 #include "ProfilingUtils.h"
 #include "llvm/Support/Debug.h"
@@ -33,6 +34,11 @@
                               "Insert instrumentation for basic block tracing");
 }
 
+ModulePass *llvm::createTraceBasicBlockPass()
+{
+	return new TraceBasicBlocks();
+}
+
 static void InsertInstrumentationCall (BasicBlock *BB,
                                        const std::string FnName,
                                        unsigned BBNumber) {