examples: Remove implicit ilist iterator conversions, NFC

llvm-svn: 252379
This commit is contained in:
Duncan P. N. Exon Smith 2015-11-07 00:55:46 +00:00
parent 33e43ca608
commit 5717ecba8e
8 changed files with 10 additions and 10 deletions

View 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");
}

View 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.

View 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.

View 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;

View 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;

View 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;

View 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;

View 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.