From 133bab0606719cf3e8f5c44873cf205f58a181b5 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Tue, 13 Feb 2007 06:22:32 +0000 Subject: [PATCH] eliminate instruction ctors that take vectors. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34228 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Instructions.h | 12 ------------ lib/VMCore/Instructions.cpp | 37 ------------------------------------- 2 files changed, 49 deletions(-) diff --git a/include/llvm/Instructions.h b/include/llvm/Instructions.h index 1c3ca0f6145..659659c65e7 100644 --- a/include/llvm/Instructions.h +++ b/include/llvm/Instructions.h @@ -17,7 +17,6 @@ #define LLVM_INSTRUCTIONS_H #include "llvm/InstrTypes.h" -#include // fixme remove. namespace llvm { @@ -700,11 +699,6 @@ public: CallInst(Value *F, Value *const *Args, unsigned NumArgs, const std::string &Name, BasicBlock *InsertAtEnd); - CallInst(Value *F, const std::vector &Par, - const std::string &Name = "", Instruction *InsertBefore = 0); - CallInst(Value *F, const std::vector &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, @@ -1486,12 +1480,6 @@ class InvokeInst : public TerminatorInst { void init(Value *Fn, BasicBlock *IfNormal, BasicBlock *IfException, Value* const *Args, unsigned NumArgs); public: - InvokeInst(Value *Fn, BasicBlock *IfNormal, BasicBlock *IfException, - const std::vector &Params, const std::string &Name = "", - Instruction *InsertBefore = 0); - InvokeInst(Value *Fn, BasicBlock *IfNormal, BasicBlock *IfException, - const std::vector &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); diff --git a/lib/VMCore/Instructions.cpp b/lib/VMCore/Instructions.cpp index bc4281cb465..2b57af85272 100644 --- a/lib/VMCore/Instructions.cpp +++ b/lib/VMCore/Instructions.cpp @@ -268,14 +268,6 @@ void CallInst::init(Value *Func) { assert(FTy->getNumParams() == 0 && "Calling a function with bad signature"); } -CallInst::CallInst(Value *Func, const std::vector &Params, - const std::string &Name, Instruction *InsertBefore) - : Instruction(cast(cast(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(cast(Func->getType()) @@ -291,15 +283,6 @@ CallInst::CallInst(Value *Func, Value* const *Args, unsigned NumArgs, init(Func, Args, NumArgs); } -CallInst::CallInst(Value *Func, const std::vector &Params, - const std::string &Name, BasicBlock *InsertAtEnd) -: Instruction(cast(cast(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(cast(Func->getType()) @@ -411,26 +394,6 @@ InvokeInst::InvokeInst(Value *Fn, BasicBlock *IfNormal, init(Fn, IfNormal, IfException, Args, NumArgs); } -InvokeInst::InvokeInst(Value *Fn, BasicBlock *IfNormal, - BasicBlock *IfException, - const std::vector &Params, - const std::string &Name, Instruction *InsertBefore) - : TerminatorInst(cast(cast(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 &Params, - const std::string &Name, BasicBlock *InsertAtEnd) - : TerminatorInst(cast(cast(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()) { -- 2.34.1