summaryrefslogtreecommitdiff
path: root/lib/Transforms/Instrumentation
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2007-02-05 21:19:13 +0000
committerReid Spencer <rspencer@reidspencer.com>2007-02-05 21:19:13 +0000
commit688b0490e22eb67623f5aaa24406209be74efcb2 (patch)
tree69eb17e5f7e3136a7b336ed6c5d0a2ed5692a44d /lib/Transforms/Instrumentation
parentcdedc3b336ff7552e439723fdb96dda68b1dbbdb (diff)
downloadllvm-688b0490e22eb67623f5aaa24406209be74efcb2.tar.gz
llvm-688b0490e22eb67623f5aaa24406209be74efcb2.tar.bz2
llvm-688b0490e22eb67623f5aaa24406209be74efcb2.tar.xz
For PR411:
Adjust to changes in Module interface: getMainFunction() -> getFunction("main") getNamedFunction(X) -> getFunction(X) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33922 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Instrumentation')
-rw-r--r--lib/Transforms/Instrumentation/BlockProfiling.cpp4
-rw-r--r--lib/Transforms/Instrumentation/EdgeProfiling.cpp2
-rw-r--r--lib/Transforms/Instrumentation/TraceBasicBlocks.cpp2
3 files changed, 4 insertions, 4 deletions
diff --git a/lib/Transforms/Instrumentation/BlockProfiling.cpp b/lib/Transforms/Instrumentation/BlockProfiling.cpp
index add1bf01ef..23f2093499 100644
--- a/lib/Transforms/Instrumentation/BlockProfiling.cpp
+++ b/lib/Transforms/Instrumentation/BlockProfiling.cpp
@@ -45,7 +45,7 @@ ModulePass *llvm::createFunctionProfilerPass() {
}
bool FunctionProfiler::runOnModule(Module &M) {
- Function *Main = M.getMainFunction();
+ Function *Main = M.getFunction("main");
if (Main == 0) {
cerr << "WARNING: cannot insert function profiling into a module"
<< " with no main function!\n";
@@ -88,7 +88,7 @@ namespace {
ModulePass *llvm::createBlockProfilerPass() { return new BlockProfiler(); }
bool BlockProfiler::runOnModule(Module &M) {
- Function *Main = M.getMainFunction();
+ Function *Main = M.getFunction("main");
if (Main == 0) {
cerr << "WARNING: cannot insert block profiling into a module"
<< " with no main function!\n";
diff --git a/lib/Transforms/Instrumentation/EdgeProfiling.cpp b/lib/Transforms/Instrumentation/EdgeProfiling.cpp
index 97b5d5ca42..4960d3c206 100644
--- a/lib/Transforms/Instrumentation/EdgeProfiling.cpp
+++ b/lib/Transforms/Instrumentation/EdgeProfiling.cpp
@@ -40,7 +40,7 @@ namespace {
ModulePass *llvm::createEdgeProfilerPass() { return new EdgeProfiler(); }
bool EdgeProfiler::runOnModule(Module &M) {
- Function *Main = M.getMainFunction();
+ Function *Main = M.getFunction("main");
if (Main == 0) {
cerr << "WARNING: cannot insert edge profiling into a module"
<< " with no main function!\n";
diff --git a/lib/Transforms/Instrumentation/TraceBasicBlocks.cpp b/lib/Transforms/Instrumentation/TraceBasicBlocks.cpp
index 68e0d282cc..4c09fb61c5 100644
--- a/lib/Transforms/Instrumentation/TraceBasicBlocks.cpp
+++ b/lib/Transforms/Instrumentation/TraceBasicBlocks.cpp
@@ -58,7 +58,7 @@ static void InsertInstrumentationCall (BasicBlock *BB,
}
bool TraceBasicBlocks::runOnModule(Module &M) {
- Function *Main = M.getMainFunction();
+ Function *Main = M.getFunction("main");
if (Main == 0) {
cerr << "WARNING: cannot insert basic-block trace instrumentation"
<< " into a module with no main function!\n";