diff options
Diffstat (limited to 'lib/Transforms')
-rw-r--r-- | lib/Transforms/IPO/ExtractFunction.cpp | 2 | ||||
-rw-r--r-- | lib/Transforms/IPO/IndMemRemoval.cpp | 4 | ||||
-rw-r--r-- | lib/Transforms/IPO/Internalize.cpp | 2 | ||||
-rw-r--r-- | lib/Transforms/IPO/LowerSetJmp.cpp | 4 | ||||
-rw-r--r-- | lib/Transforms/IPO/StripSymbols.cpp | 10 | ||||
-rw-r--r-- | lib/Transforms/Instrumentation/BlockProfiling.cpp | 4 | ||||
-rw-r--r-- | lib/Transforms/Instrumentation/EdgeProfiling.cpp | 2 | ||||
-rw-r--r-- | lib/Transforms/Instrumentation/TraceBasicBlocks.cpp | 2 | ||||
-rw-r--r-- | lib/Transforms/Scalar/LowerGC.cpp | 6 |
9 files changed, 18 insertions, 18 deletions
diff --git a/lib/Transforms/IPO/ExtractFunction.cpp b/lib/Transforms/IPO/ExtractFunction.cpp index 0595b5c2f7..f8771845a6 100644 --- a/lib/Transforms/IPO/ExtractFunction.cpp +++ b/lib/Transforms/IPO/ExtractFunction.cpp @@ -33,7 +33,7 @@ namespace { 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/lib/Transforms/IPO/IndMemRemoval.cpp b/lib/Transforms/IPO/IndMemRemoval.cpp index 0d2f350e85..343fadb637 100644 --- a/lib/Transforms/IPO/IndMemRemoval.cpp +++ b/lib/Transforms/IPO/IndMemRemoval.cpp @@ -44,7 +44,7 @@ bool IndMemRemPass::runOnModule(Module &M) { //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 @@ bool IndMemRemPass::runOnModule(Module &M) { 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/lib/Transforms/IPO/Internalize.cpp b/lib/Transforms/IPO/Internalize.cpp index 54312b70b1..eebc70a47f 100644 --- a/lib/Transforms/IPO/Internalize.cpp +++ b/lib/Transforms/IPO/Internalize.cpp @@ -95,7 +95,7 @@ bool InternalizePass::runOnModule(Module &M) { // 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/lib/Transforms/IPO/LowerSetJmp.cpp b/lib/Transforms/IPO/LowerSetJmp.cpp index a7da282c6a..8941c8b7b7 100644 --- a/lib/Transforms/IPO/LowerSetJmp.cpp +++ b/lib/Transforms/IPO/LowerSetJmp.cpp @@ -127,8 +127,8 @@ bool LowerSetJmp::runOnModule(Module& M) { 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/lib/Transforms/IPO/StripSymbols.cpp b/lib/Transforms/IPO/StripSymbols.cpp index db4387fa54..00cfc513b6 100644 --- a/lib/Transforms/IPO/StripSymbols.cpp +++ b/lib/Transforms/IPO/StripSymbols.cpp @@ -94,11 +94,11 @@ bool StripSymbols::runOnModule(Module &M) { // 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; 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"; diff --git a/lib/Transforms/Scalar/LowerGC.cpp b/lib/Transforms/Scalar/LowerGC.cpp index 7c88aa2902..20636d45a2 100644 --- a/lib/Transforms/Scalar/LowerGC.cpp +++ b/lib/Transforms/Scalar/LowerGC.cpp @@ -98,9 +98,9 @@ const StructType *LowerGC::getRootRecordType(unsigned NumRoots) { /// doInitialization - If this module uses the GC intrinsics, find them now. If /// not, this pass does not do anything. bool LowerGC::doInitialization(Module &M) { - GCRootInt = M.getNamedFunction("llvm.gcroot"); - GCReadInt = M.getNamedFunction("llvm.gcread"); - GCWriteInt = M.getNamedFunction("llvm.gcwrite"); + GCRootInt = M.getFunction("llvm.gcroot"); + GCReadInt = M.getFunction("llvm.gcread"); + GCWriteInt = M.getFunction("llvm.gcwrite"); if (!GCRootInt && !GCReadInt && !GCWriteInt) return false; PointerType *VoidPtr = PointerType::get(Type::Int8Ty); |