class TerminatePadInst : public TerminatorInst {
private:
- void init(BasicBlock *BB, ArrayRef<Value *> Args, const Twine &NameStr);
+ void init(BasicBlock *BB, ArrayRef<Value *> Args);
TerminatePadInst(const TerminatePadInst &TPI);
explicit TerminatePadInst(LLVMContext &C, BasicBlock *BB,
- ArrayRef<Value *> Args, unsigned Values,
- const Twine &NameStr, Instruction *InsertBefore);
+ ArrayRef<Value *> Args, unsigned Values,
+ Instruction *InsertBefore);
explicit TerminatePadInst(LLVMContext &C, BasicBlock *BB,
- ArrayRef<Value *> Args, unsigned Values,
- const Twine &NameStr, BasicBlock *InsertAtEnd);
+ ArrayRef<Value *> Args, unsigned Values,
+ BasicBlock *InsertAtEnd);
protected:
// Note: Instruction needs to be a friend here to call cloneImpl.
public:
static TerminatePadInst *Create(LLVMContext &C, BasicBlock *BB = nullptr,
- ArrayRef<Value *> Args = None,
- const Twine &NameStr = "",
- Instruction *InsertBefore = nullptr) {
+ ArrayRef<Value *> Args = None,
+ Instruction *InsertBefore = nullptr) {
unsigned Values = unsigned(Args.size());
if (BB)
++Values;
- return new (Values)
- TerminatePadInst(C, BB, Args, Values, NameStr, InsertBefore);
+ return new (Values) TerminatePadInst(C, BB, Args, Values, InsertBefore);
}
static TerminatePadInst *Create(LLVMContext &C, BasicBlock *BB,
- ArrayRef<Value *> Args,
- const Twine &NameStr,
- BasicBlock *InsertAtEnd) {
+ ArrayRef<Value *> Args,
+ BasicBlock *InsertAtEnd) {
unsigned Values = unsigned(Args.size());
if (BB)
++Values;
- return new (Values)
- TerminatePadInst(C, BB, Args, Values, NameStr, InsertAtEnd);
+ return new (Values) TerminatePadInst(C, BB, Args, Values, InsertAtEnd);
}
/// Provide fast operand accessors
//===----------------------------------------------------------------------===//
// TerminatePadInst Implementation
//===----------------------------------------------------------------------===//
-void TerminatePadInst::init(BasicBlock *BB, ArrayRef<Value *> Args,
- const Twine &NameStr) {
+void TerminatePadInst::init(BasicBlock *BB, ArrayRef<Value *> Args) {
SubclassOptionalData = 0;
if (BB)
setInstructionSubclassData(getSubclassDataFromInstruction() | 1);
if (BB)
Op<-1>() = BB;
std::copy(Args.begin(), Args.end(), op_begin());
- setName(NameStr);
}
TerminatePadInst::TerminatePadInst(const TerminatePadInst &TPI)
}
TerminatePadInst::TerminatePadInst(LLVMContext &C, BasicBlock *BB,
- ArrayRef<Value *> Args, unsigned Values,
- const Twine &NameStr,
- Instruction *InsertBefore)
+ ArrayRef<Value *> Args, unsigned Values,
+ Instruction *InsertBefore)
: TerminatorInst(Type::getVoidTy(C), Instruction::TerminatePad,
OperandTraits<TerminatePadInst>::op_end(this) - Values,
Values, InsertBefore) {
- init(BB, Args, NameStr);
+ init(BB, Args);
}
TerminatePadInst::TerminatePadInst(LLVMContext &C, BasicBlock *BB,
- ArrayRef<Value *> Args, unsigned Values,
- const Twine &NameStr,
- BasicBlock *InsertAtEnd)
+ ArrayRef<Value *> Args, unsigned Values,
+ BasicBlock *InsertAtEnd)
: TerminatorInst(Type::getVoidTy(C), Instruction::TerminatePad,
OperandTraits<TerminatePadInst>::op_end(this) - Values,
Values, InsertAtEnd) {
- init(BB, Args, NameStr);
+ init(BB, Args);
}
BasicBlock *TerminatePadInst::getSuccessorV(unsigned Idx) const {