[llvm-commits] CVS: llvm/lib/Transforms/IPO/ExtractFunction.cpp IndMemRemoval.cpp Internalize.cpp LowerSetJmp.cpp StripSymbols.cpp

Reid Spencer reid at x10sys.com
Mon Feb 5 13:19:53 PST 2007



Changes in directory llvm/lib/Transforms/IPO:

ExtractFunction.cpp updated: 1.17 -> 1.18
IndMemRemoval.cpp updated: 1.12 -> 1.13
Internalize.cpp updated: 1.42 -> 1.43
LowerSetJmp.cpp updated: 1.37 -> 1.38
StripSymbols.cpp updated: 1.11 -> 1.12
---
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:  (+11 -11)

 ExtractFunction.cpp |    2 +-
 IndMemRemoval.cpp   |    4 ++--
 Internalize.cpp     |    2 +-
 LowerSetJmp.cpp     |    4 ++--
 StripSymbols.cpp    |   10 +++++-----
 5 files changed, 11 insertions(+), 11 deletions(-)


Index: llvm/lib/Transforms/IPO/ExtractFunction.cpp
diff -u llvm/lib/Transforms/IPO/ExtractFunction.cpp:1.17 llvm/lib/Transforms/IPO/ExtractFunction.cpp:1.18
--- llvm/lib/Transforms/IPO/ExtractFunction.cpp:1.17	Tue Jan 30 14:08:38 2007
+++ llvm/lib/Transforms/IPO/ExtractFunction.cpp	Mon Feb  5 15:19:13 2007
@@ -33,7 +33,7 @@
 
     bool runOnModule(Module &M) {
       if (Named == 0) {
-        Named = M.getMainFunction();
+        Named = M.getFunction("main");
         if (Named == 0) return false;  // No function to extract
       }
       


Index: llvm/lib/Transforms/IPO/IndMemRemoval.cpp
diff -u llvm/lib/Transforms/IPO/IndMemRemoval.cpp:1.12 llvm/lib/Transforms/IPO/IndMemRemoval.cpp:1.13
--- llvm/lib/Transforms/IPO/IndMemRemoval.cpp:1.12	Tue Jan 30 14:08:38 2007
+++ llvm/lib/Transforms/IPO/IndMemRemoval.cpp	Mon Feb  5 15:19:13 2007
@@ -44,7 +44,7 @@
   //functions, ensuring that all malloc and free that might happen
   //happen through intrinsics.
   bool changed = false;
-  if (Function* F = M.getNamedFunction("free")) {
+  if (Function* F = M.getFunction("free")) {
     assert(F->isDeclaration() && "free not external?");
     if (!F->use_empty()) {
       Function* FN = new Function(F->getFunctionType(), 
@@ -59,7 +59,7 @@
       changed = true;
     }
   }
-  if (Function* F = M.getNamedFunction("malloc")) {
+  if (Function* F = M.getFunction("malloc")) {
     assert(F->isDeclaration() && "malloc not external?");
     if (!F->use_empty()) {
       Function* FN = new Function(F->getFunctionType(), 


Index: llvm/lib/Transforms/IPO/Internalize.cpp
diff -u llvm/lib/Transforms/IPO/Internalize.cpp:1.42 llvm/lib/Transforms/IPO/Internalize.cpp:1.43
--- llvm/lib/Transforms/IPO/Internalize.cpp:1.42	Tue Jan 30 14:08:38 2007
+++ llvm/lib/Transforms/IPO/Internalize.cpp	Mon Feb  5 15:19:13 2007
@@ -95,7 +95,7 @@
   // internalize the module, it must be a library or something.
   //
   if (ExternalNames.empty()) {
-    Function *MainFunc = M.getMainFunction();
+    Function *MainFunc = M.getFunction("main");
     if (MainFunc == 0 || MainFunc->isDeclaration())
       return false;  // No main found, must be a library...
     


Index: llvm/lib/Transforms/IPO/LowerSetJmp.cpp
diff -u llvm/lib/Transforms/IPO/LowerSetJmp.cpp:1.37 llvm/lib/Transforms/IPO/LowerSetJmp.cpp:1.38
--- llvm/lib/Transforms/IPO/LowerSetJmp.cpp:1.37	Thu Jan 11 12:21:29 2007
+++ llvm/lib/Transforms/IPO/LowerSetJmp.cpp	Mon Feb  5 15:19:13 2007
@@ -127,8 +127,8 @@
   bool Changed = false;
 
   // These are what the functions are called.
-  Function* SetJmp = M.getNamedFunction("llvm.setjmp");
-  Function* LongJmp = M.getNamedFunction("llvm.longjmp");
+  Function* SetJmp = M.getFunction("llvm.setjmp");
+  Function* LongJmp = M.getFunction("llvm.longjmp");
 
   // This program doesn't have longjmp and setjmp calls.
   if ((!LongJmp || LongJmp->use_empty()) &&


Index: llvm/lib/Transforms/IPO/StripSymbols.cpp
diff -u llvm/lib/Transforms/IPO/StripSymbols.cpp:1.11 llvm/lib/Transforms/IPO/StripSymbols.cpp:1.12
--- llvm/lib/Transforms/IPO/StripSymbols.cpp:1.11	Mon Feb  5 14:47:20 2007
+++ llvm/lib/Transforms/IPO/StripSymbols.cpp	Mon Feb  5 15:19:13 2007
@@ -94,11 +94,11 @@
   // Strip debug info in the module if it exists.  To do this, we remove
   // llvm.dbg.func.start, llvm.dbg.stoppoint, and llvm.dbg.region.end calls, and
   // any globals they point to if now dead.
-  Function *FuncStart = M.getNamedFunction("llvm.dbg.func.start");
-  Function *StopPoint = M.getNamedFunction("llvm.dbg.stoppoint");
-  Function *RegionStart = M.getNamedFunction("llvm.dbg.region.start");
-  Function *RegionEnd = M.getNamedFunction("llvm.dbg.region.end");
-  Function *Declare = M.getNamedFunction("llvm.dbg.declare");
+  Function *FuncStart = M.getFunction("llvm.dbg.func.start");
+  Function *StopPoint = M.getFunction("llvm.dbg.stoppoint");
+  Function *RegionStart = M.getFunction("llvm.dbg.region.start");
+  Function *RegionEnd = M.getFunction("llvm.dbg.region.end");
+  Function *Declare = M.getFunction("llvm.dbg.declare");
   if (!FuncStart && !StopPoint && !RegionStart && !RegionEnd && !Declare)
     return true;
 






More information about the llvm-commits mailing list