mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-05 13:26:55 +00:00
Convert CallInst and InvokeInst APIs to use ArrayRef.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135265 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -794,8 +794,7 @@ static void CleanupAndPrepareModules(BugDriver &BD, Module *&Test,
|
||||
|
||||
// Call the old main function and return its result
|
||||
BasicBlock *BB = BasicBlock::Create(Safe->getContext(), "entry", newMain);
|
||||
CallInst *call = CallInst::Create(oldMainProto, args.begin(), args.end(),
|
||||
"", BB);
|
||||
CallInst *call = CallInst::Create(oldMainProto, args, "", BB);
|
||||
|
||||
// If the type of old function wasn't void, return value of call
|
||||
ReturnInst::Create(Safe->getContext(), call, BB);
|
||||
@@ -873,8 +872,7 @@ static void CleanupAndPrepareModules(BugDriver &BD, Module *&Test,
|
||||
//
|
||||
// call resolver(GetElementPtr...)
|
||||
CallInst *Resolver =
|
||||
CallInst::Create(resolverFunc, ResolverArgs.begin(),
|
||||
ResolverArgs.end(), "resolver", LookupBB);
|
||||
CallInst::Create(resolverFunc, ResolverArgs, "resolver", LookupBB);
|
||||
|
||||
// Cast the result from the resolver to correctly-typed function.
|
||||
CastInst *CastedResolver =
|
||||
@@ -899,10 +897,10 @@ static void CleanupAndPrepareModules(BugDriver &BD, Module *&Test,
|
||||
|
||||
// Pass on the arguments to the real function, return its result
|
||||
if (F->getReturnType()->isVoidTy()) {
|
||||
CallInst::Create(FuncPtr, Args.begin(), Args.end(), "", DoCallBB);
|
||||
CallInst::Create(FuncPtr, Args, "", DoCallBB);
|
||||
ReturnInst::Create(F->getContext(), DoCallBB);
|
||||
} else {
|
||||
CallInst *Call = CallInst::Create(FuncPtr, Args.begin(), Args.end(),
|
||||
CallInst *Call = CallInst::Create(FuncPtr, Args,
|
||||
"retval", DoCallBB);
|
||||
ReturnInst::Create(F->getContext(),Call, DoCallBB);
|
||||
}
|
||||
|
Reference in New Issue
Block a user