summaryrefslogtreecommitdiffstats
path: root/llvm/examples
diff options
context:
space:
mode:
authorFrancois Pichet <pichet2000@gmail.com>2011-07-15 10:59:52 +0000
committerFrancois Pichet <pichet2000@gmail.com>2011-07-15 10:59:52 +0000
commitc5d10504d5767896f38c3c4d2ae966348f0aa2cf (patch)
tree1c012c27cb820452b80de1fe2891813cc0a32024 /llvm/examples
parent5bd375a6cc2e7518c4cfb881b0c5c42f8b78f947 (diff)
downloadbcm5719-llvm-c5d10504d5767896f38c3c4d2ae966348f0aa2cf.tar.gz
bcm5719-llvm-c5d10504d5767896f38c3c4d2ae966348f0aa2cf.zip
Convert CallInst and InvokeInst APIs to use ArrayRef. For the LLVM examples.
llvm-svn: 135266
Diffstat (limited to 'llvm/examples')
-rw-r--r--llvm/examples/BrainF/BrainF.cpp6
-rw-r--r--llvm/examples/Kaleidoscope/Chapter3/toy.cpp2
-rw-r--r--llvm/examples/Kaleidoscope/Chapter4/toy.cpp2
-rw-r--r--llvm/examples/Kaleidoscope/Chapter5/toy.cpp2
-rw-r--r--llvm/examples/Kaleidoscope/Chapter6/toy.cpp4
-rw-r--r--llvm/examples/Kaleidoscope/Chapter7/toy.cpp4
6 files changed, 10 insertions, 10 deletions
diff --git a/llvm/examples/BrainF/BrainF.cpp b/llvm/examples/BrainF/BrainF.cpp
index e8d87ebfe0d..67af099d1d3 100644
--- a/llvm/examples/BrainF/BrainF.cpp
+++ b/llvm/examples/BrainF/BrainF.cpp
@@ -99,7 +99,7 @@ void BrainF::header(LLVMContext& C) {
};
CallInst *memset_call = builder->
- CreateCall(memset_func, memset_params, array_endof(memset_params));
+ CreateCall(memset_func, memset_params);
memset_call->setTailCall(false);
}
@@ -171,7 +171,7 @@ void BrainF::header(LLVMContext& C) {
CallInst *puts_call =
CallInst::Create(puts_func,
- puts_params, array_endof(puts_params),
+ puts_params,
"", aberrorbb);
puts_call->setTailCall(false);
}
@@ -229,7 +229,7 @@ void BrainF::readloop(PHINode *phi, BasicBlock *oldbb, BasicBlock *testbb,
};
CallInst *putchar_call = builder->
CreateCall(putchar_func,
- putchar_params, array_endof(putchar_params));
+ putchar_params);
putchar_call->setTailCall(false);
}
break;
diff --git a/llvm/examples/Kaleidoscope/Chapter3/toy.cpp b/llvm/examples/Kaleidoscope/Chapter3/toy.cpp
index 22fe6772b3c..33980f5ba86 100644
--- a/llvm/examples/Kaleidoscope/Chapter3/toy.cpp
+++ b/llvm/examples/Kaleidoscope/Chapter3/toy.cpp
@@ -395,7 +395,7 @@ Value *CallExprAST::Codegen() {
if (ArgsV.back() == 0) return 0;
}
- return Builder.CreateCall(CalleeF, ArgsV.begin(), ArgsV.end(), "calltmp");
+ return Builder.CreateCall(CalleeF, ArgsV, "calltmp");
}
Function *PrototypeAST::Codegen() {
diff --git a/llvm/examples/Kaleidoscope/Chapter4/toy.cpp b/llvm/examples/Kaleidoscope/Chapter4/toy.cpp
index 4ac7e0eb565..1bed182ab54 100644
--- a/llvm/examples/Kaleidoscope/Chapter4/toy.cpp
+++ b/llvm/examples/Kaleidoscope/Chapter4/toy.cpp
@@ -403,7 +403,7 @@ Value *CallExprAST::Codegen() {
if (ArgsV.back() == 0) return 0;
}
- return Builder.CreateCall(CalleeF, ArgsV.begin(), ArgsV.end(), "calltmp");
+ return Builder.CreateCall(CalleeF, ArgsV, "calltmp");
}
Function *PrototypeAST::Codegen() {
diff --git a/llvm/examples/Kaleidoscope/Chapter5/toy.cpp b/llvm/examples/Kaleidoscope/Chapter5/toy.cpp
index 20a0d2b5256..58ab6f3990e 100644
--- a/llvm/examples/Kaleidoscope/Chapter5/toy.cpp
+++ b/llvm/examples/Kaleidoscope/Chapter5/toy.cpp
@@ -504,7 +504,7 @@ Value *CallExprAST::Codegen() {
if (ArgsV.back() == 0) return 0;
}
- return Builder.CreateCall(CalleeF, ArgsV.begin(), ArgsV.end(), "calltmp");
+ return Builder.CreateCall(CalleeF, ArgsV, "calltmp");
}
Value *IfExprAST::Codegen() {
diff --git a/llvm/examples/Kaleidoscope/Chapter6/toy.cpp b/llvm/examples/Kaleidoscope/Chapter6/toy.cpp
index 7d318159b18..b25e946cc2d 100644
--- a/llvm/examples/Kaleidoscope/Chapter6/toy.cpp
+++ b/llvm/examples/Kaleidoscope/Chapter6/toy.cpp
@@ -589,7 +589,7 @@ Value *BinaryExprAST::Codegen() {
assert(F && "binary operator not found!");
Value *Ops[] = { L, R };
- return Builder.CreateCall(F, Ops, Ops+2, "binop");
+ return Builder.CreateCall(F, Ops, "binop");
}
Value *CallExprAST::Codegen() {
@@ -608,7 +608,7 @@ Value *CallExprAST::Codegen() {
if (ArgsV.back() == 0) return 0;
}
- return Builder.CreateCall(CalleeF, ArgsV.begin(), ArgsV.end(), "calltmp");
+ return Builder.CreateCall(CalleeF, ArgsV, "calltmp");
}
Value *IfExprAST::Codegen() {
diff --git a/llvm/examples/Kaleidoscope/Chapter7/toy.cpp b/llvm/examples/Kaleidoscope/Chapter7/toy.cpp
index 5e389794120..63a7bca29df 100644
--- a/llvm/examples/Kaleidoscope/Chapter7/toy.cpp
+++ b/llvm/examples/Kaleidoscope/Chapter7/toy.cpp
@@ -685,7 +685,7 @@ Value *BinaryExprAST::Codegen() {
assert(F && "binary operator not found!");
Value *Ops[] = { L, R };
- return Builder.CreateCall(F, Ops, Ops+2, "binop");
+ return Builder.CreateCall(F, Ops, "binop");
}
Value *CallExprAST::Codegen() {
@@ -704,7 +704,7 @@ Value *CallExprAST::Codegen() {
if (ArgsV.back() == 0) return 0;
}
- return Builder.CreateCall(CalleeF, ArgsV.begin(), ArgsV.end(), "calltmp");
+ return Builder.CreateCall(CalleeF, ArgsV, "calltmp");
}
Value *IfExprAST::Codegen() {
OpenPOWER on IntegriCloud