examples: Remove implicit ilist iterator conversions, NFC
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>
Sat, 7 Nov 2015 00:55:46 +0000 (00:55 +0000)
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>
Sat, 7 Nov 2015 00:55:46 +0000 (00:55 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252379 91177308-0d34-0410-b5e6-96231b3b80d8

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

index 99c8ff36dc614fb88f4a5370d50cae0a799a8d7f..1a38c67b0d4a0fc23b46dea5188a8266268435a8 100644 (file)
@@ -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");
   }
 
index bb364fda584f26e7610bf37bde101dd0a091af68..ecb49eb92e1ac9b3f41e7edd47d1f799c5cc0cd4 100644 (file)
@@ -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.
index e5fca3fe98df1cfe78bb5335e231743dae41a7ce..e0bf6a00bf017d84c0d1dac409a0f77d9c03108d 100644 (file)
@@ -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.
index 877a7262e9125fe6c2f4fa38b5dd64a347dd4b4e..8ba76e86ee072b6f82a7262378abaf1aaee42aae 100644 (file)
@@ -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;
index 085d0da8f512cde6b5c70108d821a072002570be..2a6bb92246d04a5a090ed2c4dd673d4a43e6d900 100644 (file)
@@ -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;
index 1dc4772d5257c96d8d4c0e0d086516eae9e32e53..5205b406ed71811fce4d5b53aeaa84d26d2c9959 100644 (file)
@@ -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;
index f53fe2477fe3af90281bb2f698138f845b319042..ebaff49e89b25712cd11c697c57dcd9560ac5226 100644 (file)
@@ -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;
index 27ea8b1419fb6a0460a71848c636fb9656132e98..3c485d4c964d1532972d4b57adaeab2686de65aa 100644 (file)
@@ -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.