[llvm] r244276 - [IR] Remove TerminateInst's "NameStr" argument
David Majnemer via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 6 14:08:36 PDT 2015
Author: majnemer
Date: Thu Aug 6 16:08:36 2015
New Revision: 244276
URL: http://llvm.org/viewvc/llvm-project?rev=244276&view=rev
Log:
[IR] Remove TerminateInst's "NameStr" argument
TerminateInst can't have a name because it doesn't produce a result. No
functionality change is intended, this is just a cleanup.
Modified:
llvm/trunk/include/llvm/IR/Instructions.h
llvm/trunk/lib/IR/Instructions.cpp
Modified: llvm/trunk/include/llvm/IR/Instructions.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/Instructions.h?rev=244276&r1=244275&r2=244276&view=diff
==============================================================================
--- llvm/trunk/include/llvm/IR/Instructions.h (original)
+++ llvm/trunk/include/llvm/IR/Instructions.h Thu Aug 6 16:08:36 2015
@@ -3862,16 +3862,16 @@ DEFINE_TRANSPARENT_OPERAND_ACCESSORS(Cat
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.
@@ -3880,24 +3880,20 @@ protected:
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
Modified: llvm/trunk/lib/IR/Instructions.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/Instructions.cpp?rev=244276&r1=244275&r2=244276&view=diff
==============================================================================
--- llvm/trunk/lib/IR/Instructions.cpp (original)
+++ llvm/trunk/lib/IR/Instructions.cpp Thu Aug 6 16:08:36 2015
@@ -882,15 +882,13 @@ void CatchPadInst::setSuccessorV(unsigne
//===----------------------------------------------------------------------===//
// 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)
@@ -904,23 +902,21 @@ TerminatePadInst::TerminatePadInst(const
}
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 {
More information about the llvm-commits
mailing list