Add missing createXxxPass functions

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19319 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Jeff Cohen
2005-01-07 06:57:28 +00:00
parent afc2000a1b
commit d9ed8c8880
6 changed files with 40 additions and 3 deletions

View File

@ -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) {