mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-27 14:24:40 +00:00
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
This commit is contained in:
@ -929,7 +929,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;
|
||||
@ -1677,10 +1677,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;
|
||||
}
|
||||
@ -1691,7 +1691,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;
|
||||
@ -1720,7 +1720,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;
|
||||
@ -1746,7 +1746,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;
|
||||
|
Reference in New Issue
Block a user