Skip to content

Commit

Permalink
examples: Remove implicit ilist iterator conversions, NFC
Browse files Browse the repository at this point in the history
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252379 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
dexonsmith committed Nov 7, 2015
1 parent 38bab16 commit 7d7668e
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions examples/BrainF/BrainFDriver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}

Expand Down
2 changes: 1 addition & 1 deletion examples/Fibonacci/fibonacci.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion examples/HowToUseJIT/HowToUseJIT.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion examples/Kaleidoscope/Orc/fully_lazy/toy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion examples/Kaleidoscope/Orc/initial/toy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion examples/Kaleidoscope/Orc/lazy_codegen/toy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion examples/Kaleidoscope/Orc/lazy_irgen/toy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions examples/ParallelJIT/ParallelJIT.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit 7d7668e

Please sign in to comment.