From: David Majnemer Date: Thu, 6 Aug 2015 21:08:36 +0000 (+0000) Subject: [IR] Remove TerminateInst's "NameStr" argument X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2a2b242f4b5f433efa26e241ee98bb684c1a59a6;p=platform%2Fupstream%2Fllvm.git [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. llvm-svn: 244276 --- diff --git a/llvm/include/llvm/IR/Instructions.h b/llvm/include/llvm/IR/Instructions.h index 4330f2f..5540829 100644 --- a/llvm/include/llvm/IR/Instructions.h +++ b/llvm/include/llvm/IR/Instructions.h @@ -3862,16 +3862,16 @@ DEFINE_TRANSPARENT_OPERAND_ACCESSORS(CatchPadInst, Value) class TerminatePadInst : public TerminatorInst { private: - void init(BasicBlock *BB, ArrayRef Args, const Twine &NameStr); + void init(BasicBlock *BB, ArrayRef Args); TerminatePadInst(const TerminatePadInst &TPI); explicit TerminatePadInst(LLVMContext &C, BasicBlock *BB, - ArrayRef Args, unsigned Values, - const Twine &NameStr, Instruction *InsertBefore); + ArrayRef Args, unsigned Values, + Instruction *InsertBefore); explicit TerminatePadInst(LLVMContext &C, BasicBlock *BB, - ArrayRef Args, unsigned Values, - const Twine &NameStr, BasicBlock *InsertAtEnd); + ArrayRef 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 Args = None, - const Twine &NameStr = "", - Instruction *InsertBefore = nullptr) { + ArrayRef 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 Args, - const Twine &NameStr, - BasicBlock *InsertAtEnd) { + ArrayRef 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 diff --git a/llvm/lib/IR/Instructions.cpp b/llvm/lib/IR/Instructions.cpp index 6f267bd..51c64e8 100644 --- a/llvm/lib/IR/Instructions.cpp +++ b/llvm/lib/IR/Instructions.cpp @@ -882,15 +882,13 @@ void CatchPadInst::setSuccessorV(unsigned Idx, BasicBlock *B) { //===----------------------------------------------------------------------===// // TerminatePadInst Implementation //===----------------------------------------------------------------------===// -void TerminatePadInst::init(BasicBlock *BB, ArrayRef Args, - const Twine &NameStr) { +void TerminatePadInst::init(BasicBlock *BB, ArrayRef 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 &TPI) } TerminatePadInst::TerminatePadInst(LLVMContext &C, BasicBlock *BB, - ArrayRef Args, unsigned Values, - const Twine &NameStr, - Instruction *InsertBefore) + ArrayRef Args, unsigned Values, + Instruction *InsertBefore) : TerminatorInst(Type::getVoidTy(C), Instruction::TerminatePad, OperandTraits::op_end(this) - Values, Values, InsertBefore) { - init(BB, Args, NameStr); + init(BB, Args); } TerminatePadInst::TerminatePadInst(LLVMContext &C, BasicBlock *BB, - ArrayRef Args, unsigned Values, - const Twine &NameStr, - BasicBlock *InsertAtEnd) + ArrayRef Args, unsigned Values, + BasicBlock *InsertAtEnd) : TerminatorInst(Type::getVoidTy(C), Instruction::TerminatePad, OperandTraits::op_end(this) - Values, Values, InsertAtEnd) { - init(BB, Args, NameStr); + init(BB, Args); } BasicBlock *TerminatePadInst::getSuccessorV(unsigned Idx) const {