[llvm] r252379 - examples: Remove implicit ilist iterator conversions, NFC

Duncan P. N. Exon Smith via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 6 16:55:46 PST 2015


Author: dexonsmith
Date: Fri Nov  6 18:55:46 2015
New Revision: 252379

URL: http://llvm.org/viewvc/llvm-project?rev=252379&view=rev
Log:
examples: Remove implicit ilist iterator conversions, NFC

Modified:
    llvm/trunk/examples/BrainF/BrainFDriver.cpp
    llvm/trunk/examples/Fibonacci/fibonacci.cpp
    llvm/trunk/examples/HowToUseJIT/HowToUseJIT.cpp
    llvm/trunk/examples/Kaleidoscope/Orc/fully_lazy/toy.cpp
    llvm/trunk/examples/Kaleidoscope/Orc/initial/toy.cpp
    llvm/trunk/examples/Kaleidoscope/Orc/lazy_codegen/toy.cpp
    llvm/trunk/examples/Kaleidoscope/Orc/lazy_irgen/toy.cpp
    llvm/trunk/examples/ParallelJIT/ParallelJIT.cpp

Modified: llvm/trunk/examples/BrainF/BrainFDriver.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/examples/BrainF/BrainFDriver.cpp?rev=252379&r1=252378&r2=252379&view=diff
==============================================================================
--- llvm/trunk/examples/BrainF/BrainFDriver.cpp (original)
+++ llvm/trunk/examples/BrainF/BrainFDriver.cpp Fri Nov  6 18:55:46 2015
@@ -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");
   }
 

Modified: llvm/trunk/examples/Fibonacci/fibonacci.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/examples/Fibonacci/fibonacci.cpp?rev=252379&r1=252378&r2=252379&view=diff
==============================================================================
--- llvm/trunk/examples/Fibonacci/fibonacci.cpp (original)
+++ llvm/trunk/examples/Fibonacci/fibonacci.cpp Fri Nov  6 18:55:46 2015
@@ -52,7 +52,7 @@ static Function *CreateFibFunction(Modul
   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.

Modified: llvm/trunk/examples/HowToUseJIT/HowToUseJIT.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/examples/HowToUseJIT/HowToUseJIT.cpp?rev=252379&r1=252378&r2=252379&view=diff
==============================================================================
--- llvm/trunk/examples/HowToUseJIT/HowToUseJIT.cpp (original)
+++ llvm/trunk/examples/HowToUseJIT/HowToUseJIT.cpp Fri Nov  6 18:55:46 2015
@@ -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.

Modified: llvm/trunk/examples/Kaleidoscope/Orc/fully_lazy/toy.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/examples/Kaleidoscope/Orc/fully_lazy/toy.cpp?rev=252379&r1=252378&r2=252379&view=diff
==============================================================================
--- llvm/trunk/examples/Kaleidoscope/Orc/fully_lazy/toy.cpp (original)
+++ llvm/trunk/examples/Kaleidoscope/Orc/fully_lazy/toy.cpp Fri Nov  6 18:55:46 2015
@@ -1085,7 +1085,7 @@ void PrototypeAST::CreateArgumentAllocas
     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;

Modified: llvm/trunk/examples/Kaleidoscope/Orc/initial/toy.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/examples/Kaleidoscope/Orc/initial/toy.cpp?rev=252379&r1=252378&r2=252379&view=diff
==============================================================================
--- llvm/trunk/examples/Kaleidoscope/Orc/initial/toy.cpp (original)
+++ llvm/trunk/examples/Kaleidoscope/Orc/initial/toy.cpp Fri Nov  6 18:55:46 2015
@@ -1084,7 +1084,7 @@ void PrototypeAST::CreateArgumentAllocas
     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;

Modified: llvm/trunk/examples/Kaleidoscope/Orc/lazy_codegen/toy.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/examples/Kaleidoscope/Orc/lazy_codegen/toy.cpp?rev=252379&r1=252378&r2=252379&view=diff
==============================================================================
--- llvm/trunk/examples/Kaleidoscope/Orc/lazy_codegen/toy.cpp (original)
+++ llvm/trunk/examples/Kaleidoscope/Orc/lazy_codegen/toy.cpp Fri Nov  6 18:55:46 2015
@@ -1084,7 +1084,7 @@ void PrototypeAST::CreateArgumentAllocas
     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;

Modified: llvm/trunk/examples/Kaleidoscope/Orc/lazy_irgen/toy.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/examples/Kaleidoscope/Orc/lazy_irgen/toy.cpp?rev=252379&r1=252378&r2=252379&view=diff
==============================================================================
--- llvm/trunk/examples/Kaleidoscope/Orc/lazy_irgen/toy.cpp (original)
+++ llvm/trunk/examples/Kaleidoscope/Orc/lazy_irgen/toy.cpp Fri Nov  6 18:55:46 2015
@@ -1084,7 +1084,7 @@ void PrototypeAST::CreateArgumentAllocas
     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;

Modified: llvm/trunk/examples/ParallelJIT/ParallelJIT.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/examples/ParallelJIT/ParallelJIT.cpp?rev=252379&r1=252378&r2=252379&view=diff
==============================================================================
--- llvm/trunk/examples/ParallelJIT/ParallelJIT.cpp (original)
+++ llvm/trunk/examples/ParallelJIT/ParallelJIT.cpp Fri Nov  6 18:55:46 2015
@@ -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(Modul
   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.




More information about the llvm-commits mailing list