summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--examples/BrainF/BrainFDriver.cpp4
-rw-r--r--examples/Fibonacci/fibonacci.cpp2
-rw-r--r--examples/HowToUseJIT/HowToUseJIT.cpp2
-rw-r--r--examples/Kaleidoscope/Orc/fully_lazy/toy.cpp2
-rw-r--r--examples/Kaleidoscope/Orc/initial/toy.cpp2
-rw-r--r--examples/Kaleidoscope/Orc/lazy_codegen/toy.cpp2
-rw-r--r--examples/Kaleidoscope/Orc/lazy_irgen/toy.cpp2
-rw-r--r--examples/ParallelJIT/ParallelJIT.cpp4
8 files changed, 10 insertions, 10 deletions
diff --git a/examples/BrainF/BrainFDriver.cpp b/examples/BrainF/BrainFDriver.cpp
index 99c8ff36dc61..1a38c67b0d4a 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 bb364fda584f..ecb49eb92e1a 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 e5fca3fe98df..e0bf6a00bf01 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 877a7262e912..8ba76e86ee07 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 085d0da8f512..2a6bb92246d0 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 1dc4772d5257..5205b406ed71 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 f53fe2477fe3..ebaff49e89b2 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 27ea8b1419fb..3c485d4c964d 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.