diff options
author | Jay Foad <jay.foad@gmail.com> | 2011-07-15 08:37:34 +0000 |
---|---|---|
committer | Jay Foad <jay.foad@gmail.com> | 2011-07-15 08:37:34 +0000 |
commit | a3efbb15ddd5aa9006564cd79086723640084878 (patch) | |
tree | baf8eacf902c618293d636c233339c13722a5b15 /tools/bugpoint | |
parent | e083805724196bd45a3612bf9373f503b5b8a7e0 (diff) | |
download | llvm-a3efbb15ddd5aa9006564cd79086723640084878.tar.gz llvm-a3efbb15ddd5aa9006564cd79086723640084878.tar.bz2 llvm-a3efbb15ddd5aa9006564cd79086723640084878.tar.xz |
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
Diffstat (limited to 'tools/bugpoint')
-rw-r--r-- | tools/bugpoint/Miscompilation.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/tools/bugpoint/Miscompilation.cpp b/tools/bugpoint/Miscompilation.cpp index 1834fe1e12..d645dfb898 100644 --- a/tools/bugpoint/Miscompilation.cpp +++ b/tools/bugpoint/Miscompilation.cpp @@ -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); } |