diff options
author | Reid Spencer <rspencer@reidspencer.com> | 2007-02-05 21:19:13 +0000 |
---|---|---|
committer | Reid Spencer <rspencer@reidspencer.com> | 2007-02-05 21:19:13 +0000 |
commit | 1241d6d5abb58dc8af3f3dc8edc3d3b3158111a4 (patch) | |
tree | ad451cdec90d6387b43be20fdfdd733e8003a1b6 /llvm/tools/llvm-upgrade/UpgradeParser.y.cvs | |
parent | 3c52e275ea70ff0466b7a49f14ae02fa136f52f7 (diff) | |
download | bcm5719-llvm-1241d6d5abb58dc8af3f3dc8edc3d3b3158111a4.tar.gz bcm5719-llvm-1241d6d5abb58dc8af3f3dc8edc3d3b3158111a4.zip |
For PR411:
Adjust to changes in Module interface:
getMainFunction() -> getFunction("main")
getNamedFunction(X) -> getFunction(X)
llvm-svn: 33922
Diffstat (limited to 'llvm/tools/llvm-upgrade/UpgradeParser.y.cvs')
-rw-r--r-- | llvm/tools/llvm-upgrade/UpgradeParser.y.cvs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/llvm/tools/llvm-upgrade/UpgradeParser.y.cvs b/llvm/tools/llvm-upgrade/UpgradeParser.y.cvs index 0f47b386ba7..3091ea3ba21 100644 --- a/llvm/tools/llvm-upgrade/UpgradeParser.y.cvs +++ b/llvm/tools/llvm-upgrade/UpgradeParser.y.cvs @@ -569,7 +569,7 @@ ResolveDefinitions(std::map<const Type*,ValueList> &LateResolvers, if (const FunctionType *FTy = dyn_cast<FunctionType>(PTy->getElementType())) if (Function *OtherF = - CurModule.CurrentModule->getNamedFunction(DID.getName())) + CurModule.CurrentModule->getFunction(DID.getName())) if (FuncTysDifferOnlyBySRet(FTy,OtherF->getFunctionType())) { V->replaceAllUsesWith(ConstantExpr::getBitCast(OtherF, PTy)); fixed = true; @@ -1317,10 +1317,10 @@ Module* UpgradeAssembly(const std::string &infile, std::istream& in, //Not all functions use vaarg, so make a second check for ObsoleteVarArgs { Function* F; - if ((F = Result->getNamedFunction("llvm.va_start")) + if ((F = Result->getFunction("llvm.va_start")) && F->getFunctionType()->getNumParams() == 0) ObsoleteVarArgs = true; - if((F = Result->getNamedFunction("llvm.va_copy")) + if((F = Result->getFunction("llvm.va_copy")) && F->getFunctionType()->getNumParams() == 1) ObsoleteVarArgs = true; } @@ -1331,7 +1331,7 @@ Module* UpgradeAssembly(const std::string &infile, std::istream& in, } if(ObsoleteVarArgs) { - if(Function* F = Result->getNamedFunction("llvm.va_start")) { + if(Function* F = Result->getFunction("llvm.va_start")) { if (F->arg_size() != 0) { error("Obsolete va_start takes 0 argument"); return 0; @@ -1360,7 +1360,7 @@ Module* UpgradeAssembly(const std::string &infile, std::istream& in, Result->getFunctionList().erase(F); } - if(Function* F = Result->getNamedFunction("llvm.va_end")) { + if(Function* F = Result->getFunction("llvm.va_end")) { if(F->arg_size() != 1) { error("Obsolete va_end takes 1 argument"); return 0; @@ -1386,7 +1386,7 @@ Module* UpgradeAssembly(const std::string &infile, std::istream& in, Result->getFunctionList().erase(F); } - if(Function* F = Result->getNamedFunction("llvm.va_copy")) { + if(Function* F = Result->getFunction("llvm.va_copy")) { if(F->arg_size() != 1) { error("Obsolete va_copy takes 1 argument"); return 0; |