For PR411:
Adjust to changes in Module interface:
getMainFunction() -> getFunction("main")
getNamedFunction(X) -> getFunction(X)

llvm-svn: 33922
diff --git a/llvm/lib/Transforms/IPO/ExtractFunction.cpp b/llvm/lib/Transforms/IPO/ExtractFunction.cpp
index 0595b5c..f877184 100644
--- a/llvm/lib/Transforms/IPO/ExtractFunction.cpp
+++ b/llvm/lib/Transforms/IPO/ExtractFunction.cpp
@@ -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
       }
       
diff --git a/llvm/lib/Transforms/IPO/IndMemRemoval.cpp b/llvm/lib/Transforms/IPO/IndMemRemoval.cpp
index 0d2f350..343fadb 100644
--- a/llvm/lib/Transforms/IPO/IndMemRemoval.cpp
+++ b/llvm/lib/Transforms/IPO/IndMemRemoval.cpp
@@ -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(), 
diff --git a/llvm/lib/Transforms/IPO/Internalize.cpp b/llvm/lib/Transforms/IPO/Internalize.cpp
index 54312b7..eebc70a 100644
--- a/llvm/lib/Transforms/IPO/Internalize.cpp
+++ b/llvm/lib/Transforms/IPO/Internalize.cpp
@@ -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...
     
diff --git a/llvm/lib/Transforms/IPO/LowerSetJmp.cpp b/llvm/lib/Transforms/IPO/LowerSetJmp.cpp
index a7da282c..8941c8b 100644
--- a/llvm/lib/Transforms/IPO/LowerSetJmp.cpp
+++ b/llvm/lib/Transforms/IPO/LowerSetJmp.cpp
@@ -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()) &&
diff --git a/llvm/lib/Transforms/IPO/StripSymbols.cpp b/llvm/lib/Transforms/IPO/StripSymbols.cpp
index db4387f..00cfc51 100644
--- a/llvm/lib/Transforms/IPO/StripSymbols.cpp
+++ b/llvm/lib/Transforms/IPO/StripSymbols.cpp
@@ -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;