Changes in directory llvm/lib/Transforms/Instrumentation:

BlockProfiling.cpp updated: 1.20 -> 1.21
EdgeProfiling.cpp updated: 1.10 -> 1.11
TraceBasicBlocks.cpp updated: 1.21 -> 1.22
---
Log message:

For PR411: http://llvm.org/PR411 :
Adjust to changes in Module interface:
getMainFunction() -> getFunction("main")
getNamedFunction(X) -> getFunction(X)



---
Diffs of the changes:  (+4 -4)

 BlockProfiling.cpp   |    4 ++--
 EdgeProfiling.cpp    |    2 +-
 TraceBasicBlocks.cpp |    2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)


Index: llvm/lib/Transforms/Instrumentation/BlockProfiling.cpp
diff -u llvm/lib/Transforms/Instrumentation/BlockProfiling.cpp:1.20 
llvm/lib/Transforms/Instrumentation/BlockProfiling.cpp:1.21
--- llvm/lib/Transforms/Instrumentation/BlockProfiling.cpp:1.20 Tue Jan 30 
14:08:38 2007
+++ llvm/lib/Transforms/Instrumentation/BlockProfiling.cpp      Mon Feb  5 
15:19:13 2007
@@ -45,7 +45,7 @@
 }
 
 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 @@
 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";


Index: llvm/lib/Transforms/Instrumentation/EdgeProfiling.cpp
diff -u llvm/lib/Transforms/Instrumentation/EdgeProfiling.cpp:1.10 
llvm/lib/Transforms/Instrumentation/EdgeProfiling.cpp:1.11
--- llvm/lib/Transforms/Instrumentation/EdgeProfiling.cpp:1.10  Sat Dec 30 
23:48:39 2006
+++ llvm/lib/Transforms/Instrumentation/EdgeProfiling.cpp       Mon Feb  5 
15:19:13 2007
@@ -40,7 +40,7 @@
 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";


Index: llvm/lib/Transforms/Instrumentation/TraceBasicBlocks.cpp
diff -u llvm/lib/Transforms/Instrumentation/TraceBasicBlocks.cpp:1.21 
llvm/lib/Transforms/Instrumentation/TraceBasicBlocks.cpp:1.22
--- llvm/lib/Transforms/Instrumentation/TraceBasicBlocks.cpp:1.21       Sun Jan 
 7 01:22:20 2007
+++ llvm/lib/Transforms/Instrumentation/TraceBasicBlocks.cpp    Mon Feb  5 
15:19:13 2007
@@ -58,7 +58,7 @@
 }
 
 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";



_______________________________________________
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

Reply via email to