summaryrefslogtreecommitdiff
path: root/tools/llvm-upgrade/UpgradeParser.y
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2007-02-05 21:19:13 +0000
committerReid Spencer <rspencer@reidspencer.com>2007-02-05 21:19:13 +0000
commit688b0490e22eb67623f5aaa24406209be74efcb2 (patch)
tree69eb17e5f7e3136a7b336ed6c5d0a2ed5692a44d /tools/llvm-upgrade/UpgradeParser.y
parentcdedc3b336ff7552e439723fdb96dda68b1dbbdb (diff)
downloadllvm-688b0490e22eb67623f5aaa24406209be74efcb2.tar.gz
llvm-688b0490e22eb67623f5aaa24406209be74efcb2.tar.bz2
llvm-688b0490e22eb67623f5aaa24406209be74efcb2.tar.xz
For PR411:
Adjust to changes in Module interface: getMainFunction() -> getFunction("main") getNamedFunction(X) -> getFunction(X) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33922 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvm-upgrade/UpgradeParser.y')
-rw-r--r--tools/llvm-upgrade/UpgradeParser.y12
1 files changed, 6 insertions, 6 deletions
diff --git a/tools/llvm-upgrade/UpgradeParser.y b/tools/llvm-upgrade/UpgradeParser.y
index 0f47b386ba..3091ea3ba2 100644
--- a/tools/llvm-upgrade/UpgradeParser.y
+++ b/tools/llvm-upgrade/UpgradeParser.y
@@ -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;