diff options
author | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2015-10-20 18:30:20 +0000 |
---|---|---|
committer | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2015-10-20 18:30:20 +0000 |
commit | c8925b18719f5ee2da586a3f41b3e143c5d3466a (patch) | |
tree | baddaef04789a5db82498ce64cc641949c59f142 /llvm/unittests/ExecutionEngine/MCJIT/MCJITTestBase.h | |
parent | b7fcadf410bcb407812d3727b0ee1ea77d2fd887 (diff) | |
download | bcm5719-llvm-c8925b18719f5ee2da586a3f41b3e143c5d3466a.tar.gz bcm5719-llvm-c8925b18719f5ee2da586a3f41b3e143c5d3466a.zip |
unittests: Remove implicit ilist iterator conversions, NFC
llvm-svn: 250843
Diffstat (limited to 'llvm/unittests/ExecutionEngine/MCJIT/MCJITTestBase.h')
-rw-r--r-- | llvm/unittests/ExecutionEngine/MCJIT/MCJITTestBase.h | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/llvm/unittests/ExecutionEngine/MCJIT/MCJITTestBase.h b/llvm/unittests/ExecutionEngine/MCJIT/MCJITTestBase.h index d2e62d2cea2..609ac844c47 100644 --- a/llvm/unittests/ExecutionEngine/MCJIT/MCJITTestBase.h +++ b/llvm/unittests/ExecutionEngine/MCJIT/MCJITTestBase.h @@ -69,9 +69,8 @@ protected: SmallVector<Value*, 1> CallArgs; - Function::arg_iterator arg_iter = Result->arg_begin(); - for(;arg_iter != Result->arg_end(); ++arg_iter) - CallArgs.push_back(arg_iter); + for (Argument &A : Result->args()) + CallArgs.push_back(&A); Value *ReturnCode = Builder.CreateCall(Callee, CallArgs); Builder.CreateRet(ReturnCode); @@ -97,8 +96,8 @@ protected: Function *Result = startFunction<int32_t(int32_t, int32_t)>(M, Name); Function::arg_iterator args = Result->arg_begin(); - Value *Arg1 = args; - Value *Arg2 = ++args; + Value *Arg1 = &*args; + Value *Arg2 = &*++args; Value *AddResult = Builder.CreateAdd(Arg1, Arg2); endFunctionWithRet(Result, AddResult); @@ -169,7 +168,7 @@ protected: BasicBlock *RecursiveCase = BasicBlock::Create(Context, "", Result); // if (num == 0) - Value *Param = Result->arg_begin(); + Value *Param = &*Result->arg_begin(); Value *Zero = ConstantInt::get(Context, APInt(32, 0)); Builder.CreateCondBr(Builder.CreateICmpEQ(Param, Zero), BaseCase, RecursiveCase); |