[PATCH] add default value for Args parameter of Builder.CreateCall function
servuswiegehtz at yahoo.de
servuswiegehtz at yahoo.de
Tue Jun 9 12:21:06 PDT 2015
From: Pete Abred <servuswiegehtz at yahoo.de>
Default parameter allows for easier usage for functions without parameters, e.g.:
Builder.CreateCall(abort);
---
include/llvm/IR/IRBuilder.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/llvm/IR/IRBuilder.h b/include/llvm/IR/IRBuilder.h
index adf6924..fdf65a3 100644
--- a/include/llvm/IR/IRBuilder.h
+++ b/include/llvm/IR/IRBuilder.h
@@ -1465,7 +1465,7 @@ public:
return Insert(PHINode::Create(Ty, NumReservedValues), Name);
}
- CallInst *CreateCall(Value *Callee, ArrayRef<Value *> Args,
+ CallInst *CreateCall(Value *Callee, ArrayRef<Value *> Args = {},
const Twine &Name = "") {
return Insert(CallInst::Create(Callee, Args), Name);
}
--
2.4.2
More information about the llvm-commits
mailing list