From 7d7668eb6bc4f2b1984e5841b16d87b038256231 Mon Sep 17 00:00:00 2001 From: "Duncan P. N. Exon Smith" Date: Sat, 7 Nov 2015 00:55:46 +0000 Subject: [PATCH] examples: Remove implicit ilist iterator conversions, NFC git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252379 91177308-0d34-0410-b5e6-96231b3b80d8 --- examples/BrainF/BrainFDriver.cpp | 4 ++-- examples/Fibonacci/fibonacci.cpp | 2 +- examples/HowToUseJIT/HowToUseJIT.cpp | 2 +- examples/Kaleidoscope/Orc/fully_lazy/toy.cpp | 2 +- examples/Kaleidoscope/Orc/initial/toy.cpp | 2 +- examples/Kaleidoscope/Orc/lazy_codegen/toy.cpp | 2 +- examples/Kaleidoscope/Orc/lazy_irgen/toy.cpp | 2 +- examples/ParallelJIT/ParallelJIT.cpp | 4 ++-- 8 files changed, 10 insertions(+), 10 deletions(-) diff --git a/examples/BrainF/BrainFDriver.cpp b/examples/BrainF/BrainFDriver.cpp index 99c8ff36dc6..1a38c67b0d4 100644 --- a/examples/BrainF/BrainFDriver.cpp +++ b/examples/BrainF/BrainFDriver.cpp @@ -64,9 +64,9 @@ void addMainFunction(Module *mod) { IntegerType::getInt8Ty(mod->getContext()))), NULL)); { Function::arg_iterator args = main_func->arg_begin(); - Value *arg_0 = args++; + Value *arg_0 = &*args++; arg_0->setName("argc"); - Value *arg_1 = args++; + Value *arg_1 = &*args++; arg_1->setName("argv"); } diff --git a/examples/Fibonacci/fibonacci.cpp b/examples/Fibonacci/fibonacci.cpp index bb364fda584..ecb49eb92e1 100644 --- a/examples/Fibonacci/fibonacci.cpp +++ b/examples/Fibonacci/fibonacci.cpp @@ -52,7 +52,7 @@ static Function *CreateFibFunction(Module *M, LLVMContext &Context) { Value *Two = ConstantInt::get(Type::getInt32Ty(Context), 2); // Get pointer to the integer argument of the add1 function... - Argument *ArgX = FibF->arg_begin(); // Get the arg. + Argument *ArgX = &*FibF->arg_begin(); // Get the arg. ArgX->setName("AnArg"); // Give it a nice symbolic name for fun. // Create the true_block. diff --git a/examples/HowToUseJIT/HowToUseJIT.cpp b/examples/HowToUseJIT/HowToUseJIT.cpp index e5fca3fe98d..e0bf6a00bf0 100644 --- a/examples/HowToUseJIT/HowToUseJIT.cpp +++ b/examples/HowToUseJIT/HowToUseJIT.cpp @@ -80,7 +80,7 @@ int main() { // Get pointers to the integer argument of the add1 function... assert(Add1F->arg_begin() != Add1F->arg_end()); // Make sure there's an arg - Argument *ArgX = Add1F->arg_begin(); // Get the arg + Argument *ArgX = &*Add1F->arg_begin(); // Get the arg ArgX->setName("AnArg"); // Give it a nice symbolic name for fun. // Create the add instruction, inserting it into the end of BB. diff --git a/examples/Kaleidoscope/Orc/fully_lazy/toy.cpp b/examples/Kaleidoscope/Orc/fully_lazy/toy.cpp index 877a7262e91..8ba76e86ee0 100644 --- a/examples/Kaleidoscope/Orc/fully_lazy/toy.cpp +++ b/examples/Kaleidoscope/Orc/fully_lazy/toy.cpp @@ -1085,7 +1085,7 @@ void PrototypeAST::CreateArgumentAllocas(Function *F, IRGenContext &C) { AllocaInst *Alloca = CreateEntryBlockAlloca(F, Args[Idx]); // Store the initial value into the alloca. - C.getBuilder().CreateStore(AI, Alloca); + C.getBuilder().CreateStore(&*AI, Alloca); // Add arguments to variable symbol table. C.NamedValues[Args[Idx]] = Alloca; diff --git a/examples/Kaleidoscope/Orc/initial/toy.cpp b/examples/Kaleidoscope/Orc/initial/toy.cpp index 085d0da8f51..2a6bb92246d 100644 --- a/examples/Kaleidoscope/Orc/initial/toy.cpp +++ b/examples/Kaleidoscope/Orc/initial/toy.cpp @@ -1084,7 +1084,7 @@ void PrototypeAST::CreateArgumentAllocas(Function *F, IRGenContext &C) { AllocaInst *Alloca = CreateEntryBlockAlloca(F, Args[Idx]); // Store the initial value into the alloca. - C.getBuilder().CreateStore(AI, Alloca); + C.getBuilder().CreateStore(&*AI, Alloca); // Add arguments to variable symbol table. C.NamedValues[Args[Idx]] = Alloca; diff --git a/examples/Kaleidoscope/Orc/lazy_codegen/toy.cpp b/examples/Kaleidoscope/Orc/lazy_codegen/toy.cpp index 1dc4772d525..5205b406ed7 100644 --- a/examples/Kaleidoscope/Orc/lazy_codegen/toy.cpp +++ b/examples/Kaleidoscope/Orc/lazy_codegen/toy.cpp @@ -1084,7 +1084,7 @@ void PrototypeAST::CreateArgumentAllocas(Function *F, IRGenContext &C) { AllocaInst *Alloca = CreateEntryBlockAlloca(F, Args[Idx]); // Store the initial value into the alloca. - C.getBuilder().CreateStore(AI, Alloca); + C.getBuilder().CreateStore(&*AI, Alloca); // Add arguments to variable symbol table. C.NamedValues[Args[Idx]] = Alloca; diff --git a/examples/Kaleidoscope/Orc/lazy_irgen/toy.cpp b/examples/Kaleidoscope/Orc/lazy_irgen/toy.cpp index f53fe2477fe..ebaff49e89b 100644 --- a/examples/Kaleidoscope/Orc/lazy_irgen/toy.cpp +++ b/examples/Kaleidoscope/Orc/lazy_irgen/toy.cpp @@ -1084,7 +1084,7 @@ void PrototypeAST::CreateArgumentAllocas(Function *F, IRGenContext &C) { AllocaInst *Alloca = CreateEntryBlockAlloca(F, Args[Idx]); // Store the initial value into the alloca. - C.getBuilder().CreateStore(AI, Alloca); + C.getBuilder().CreateStore(&*AI, Alloca); // Add arguments to variable symbol table. C.NamedValues[Args[Idx]] = Alloca; diff --git a/examples/ParallelJIT/ParallelJIT.cpp b/examples/ParallelJIT/ParallelJIT.cpp index 27ea8b1419f..3c485d4c964 100644 --- a/examples/ParallelJIT/ParallelJIT.cpp +++ b/examples/ParallelJIT/ParallelJIT.cpp @@ -50,7 +50,7 @@ static Function* createAdd1(Module *M) { // Get pointers to the integer argument of the add1 function... assert(Add1F->arg_begin() != Add1F->arg_end()); // Make sure there's an arg - Argument *ArgX = Add1F->arg_begin(); // Get the arg + Argument *ArgX = &*Add1F->arg_begin(); // Get the arg ArgX->setName("AnArg"); // Give it a nice symbolic name for fun. // Create the add instruction, inserting it into the end of BB. @@ -80,7 +80,7 @@ static Function *CreateFibFunction(Module *M) { Value *Two = ConstantInt::get(Type::getInt32Ty(M->getContext()), 2); // Get pointer to the integer argument of the add1 function... - Argument *ArgX = FibF->arg_begin(); // Get the arg. + Argument *ArgX = &*FibF->arg_begin(); // Get the arg. ArgX->setName("AnArg"); // Give it a nice symbolic name for fun. // Create the true_block. -- 2.11.0