#define LLVM_INSTRUCTIONS_H
#include "llvm/InstrTypes.h"
-#include <vector> // fixme remove.
namespace llvm {
CallInst(Value *F, Value *const *Args, unsigned NumArgs,
const std::string &Name, BasicBlock *InsertAtEnd);
- CallInst(Value *F, const std::vector<Value*> &Par,
- const std::string &Name = "", Instruction *InsertBefore = 0);
- CallInst(Value *F, const std::vector<Value*> &Par,
- const std::string &Name, BasicBlock *InsertAtEnd);
-
// Alternate CallInst ctors w/ two actuals, w/ one actual and no
// actuals, respectively.
CallInst(Value *F, Value *Actual1, Value *Actual2,
Value* const *Args, unsigned NumArgs);
public:
InvokeInst(Value *Fn, BasicBlock *IfNormal, BasicBlock *IfException,
- const std::vector<Value*> &Params, const std::string &Name = "",
- Instruction *InsertBefore = 0);
- InvokeInst(Value *Fn, BasicBlock *IfNormal, BasicBlock *IfException,
- const std::vector<Value*> &Params, const std::string &Name,
- BasicBlock *InsertAtEnd);
- InvokeInst(Value *Fn, BasicBlock *IfNormal, BasicBlock *IfException,
Value* const* Args, unsigned NumArgs, const std::string &Name = "",
Instruction *InsertBefore = 0);
InvokeInst(Value *Fn, BasicBlock *IfNormal, BasicBlock *IfException,
assert(FTy->getNumParams() == 0 && "Calling a function with bad signature");
}
-CallInst::CallInst(Value *Func, const std::vector<Value*> &Params,
- const std::string &Name, Instruction *InsertBefore)
- : Instruction(cast<FunctionType>(cast<PointerType>(Func->getType())
- ->getElementType())->getReturnType(),
- Instruction::Call, 0, 0, Name, InsertBefore) {
- init(Func, &Params[0], Params.size());
-}
-
CallInst::CallInst(Value *Func, Value* const *Args, unsigned NumArgs,
const std::string &Name, BasicBlock *InsertAtEnd)
: Instruction(cast<FunctionType>(cast<PointerType>(Func->getType())
init(Func, Args, NumArgs);
}
-CallInst::CallInst(Value *Func, const std::vector<Value*> &Params,
- const std::string &Name, BasicBlock *InsertAtEnd)
-: Instruction(cast<FunctionType>(cast<PointerType>(Func->getType())
- ->getElementType())->getReturnType(),
- Instruction::Call, 0, 0, Name, InsertAtEnd) {
- init(Func, &Params[0], Params.size());
-}
-
-
CallInst::CallInst(Value *Func, Value *Actual1, Value *Actual2,
const std::string &Name, Instruction *InsertBefore)
: Instruction(cast<FunctionType>(cast<PointerType>(Func->getType())
init(Fn, IfNormal, IfException, Args, NumArgs);
}
-InvokeInst::InvokeInst(Value *Fn, BasicBlock *IfNormal,
- BasicBlock *IfException,
- const std::vector<Value*> &Params,
- const std::string &Name, Instruction *InsertBefore)
- : TerminatorInst(cast<FunctionType>(cast<PointerType>(Fn->getType())
- ->getElementType())->getReturnType(),
- Instruction::Invoke, 0, 0, Name, InsertBefore) {
- init(Fn, IfNormal, IfException, &Params[0], Params.size());
-}
-
-InvokeInst::InvokeInst(Value *Fn, BasicBlock *IfNormal,
- BasicBlock *IfException,
- const std::vector<Value*> &Params,
- const std::string &Name, BasicBlock *InsertAtEnd)
- : TerminatorInst(cast<FunctionType>(cast<PointerType>(Fn->getType())
- ->getElementType())->getReturnType(),
- Instruction::Invoke, 0, 0, Name, InsertAtEnd) {
- init(Fn, IfNormal, IfException, &Params[0], Params.size());
-}
-
InvokeInst::InvokeInst(const InvokeInst &II)
: TerminatorInst(II.getType(), Instruction::Invoke,
new Use[II.getNumOperands()], II.getNumOperands()) {