summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--llvm/examples/BrainF/BrainFDriver.cpp4
-rw-r--r--llvm/examples/Fibonacci/fibonacci.cpp2
-rw-r--r--llvm/examples/HowToUseJIT/HowToUseJIT.cpp2
-rw-r--r--llvm/examples/Kaleidoscope/Orc/fully_lazy/toy.cpp2
-rw-r--r--llvm/examples/Kaleidoscope/Orc/initial/toy.cpp2
-rw-r--r--llvm/examples/Kaleidoscope/Orc/lazy_codegen/toy.cpp2
-rw-r--r--llvm/examples/Kaleidoscope/Orc/lazy_irgen/toy.cpp2
-rw-r--r--llvm/examples/ParallelJIT/ParallelJIT.cpp4
8 files changed, 10 insertions, 10 deletions
diff --git a/llvm/examples/BrainF/BrainFDriver.cpp b/llvm/examples/BrainF/BrainFDriver.cpp
index 99c8ff36dc6..1a38c67b0d4 100644
--- a/llvm/examples/BrainF/BrainFDriver.cpp
+++ b/llvm/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/llvm/examples/Fibonacci/fibonacci.cpp b/llvm/examples/Fibonacci/fibonacci.cpp
index bb364fda584..ecb49eb92e1 100644
--- a/llvm/examples/Fibonacci/fibonacci.cpp
+++ b/llvm/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/llvm/examples/HowToUseJIT/HowToUseJIT.cpp b/llvm/examples/HowToUseJIT/HowToUseJIT.cpp
index e5fca3fe98d..e0bf6a00bf0 100644
--- a/llvm/examples/HowToUseJIT/HowToUseJIT.cpp
+++ b/llvm/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/llvm/examples/Kaleidoscope/Orc/fully_lazy/toy.cpp b/llvm/examples/Kaleidoscope/Orc/fully_lazy/toy.cpp
index 877a7262e91..8ba76e86ee0 100644
--- a/llvm/examples/Kaleidoscope/Orc/fully_lazy/toy.cpp
+++ b/llvm/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/llvm/examples/Kaleidoscope/Orc/initial/toy.cpp b/llvm/examples/Kaleidoscope/Orc/initial/toy.cpp
index 085d0da8f51..2a6bb92246d 100644
--- a/llvm/examples/Kaleidoscope/Orc/initial/toy.cpp
+++ b/llvm/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/llvm/examples/Kaleidoscope/Orc/lazy_codegen/toy.cpp b/llvm/examples/Kaleidoscope/Orc/lazy_codegen/toy.cpp
index 1dc4772d525..5205b406ed7 100644
--- a/llvm/examples/Kaleidoscope/Orc/lazy_codegen/toy.cpp
+++ b/llvm/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/llvm/examples/Kaleidoscope/Orc/lazy_irgen/toy.cpp b/llvm/examples/Kaleidoscope/Orc/lazy_irgen/toy.cpp
index f53fe2477fe..ebaff49e89b 100644
--- a/llvm/examples/Kaleidoscope/Orc/lazy_irgen/toy.cpp
+++ b/llvm/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/llvm/examples/ParallelJIT/ParallelJIT.cpp b/llvm/examples/ParallelJIT/ParallelJIT.cpp
index 27ea8b1419f..3c485d4c964 100644
--- a/llvm/examples/ParallelJIT/ParallelJIT.cpp
+++ b/llvm/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.
OpenPOWER on IntegriCloud