aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-02-13 00:58:44 +0000
committerChris Lattner <sabre@nondot.org>2007-02-13 00:58:44 +0000
commitd54f432006283ce5ff5626799eb2d7937542b3e8 (patch)
treecbb129c3b7daaa8a5c463cdd70c1ab19bfc31579
parent7d9801dc88757fb82dd6158c7a34ca3ad0c3ca80 (diff)
remove some dead methods.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34213 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/llvm/Instructions.h11
-rw-r--r--lib/VMCore/Instructions.cpp33
2 files changed, 9 insertions, 35 deletions
diff --git a/include/llvm/Instructions.h b/include/llvm/Instructions.h
index 62c805f2de..70ae0e694f 100644
--- a/include/llvm/Instructions.h
+++ b/include/llvm/Instructions.h
@@ -345,10 +345,6 @@ public:
/// list of indices. The first ctor can optionally insert before an existing
/// instruction, the second appends the new instruction to the specified
/// BasicBlock.
- GetElementPtrInst(Value *Ptr, const std::vector<Value*> &Idx,
- const std::string &Name = "", Instruction *InsertBefore =0);
- GetElementPtrInst(Value *Ptr, const std::vector<Value*> &Idx,
- const std::string &Name, BasicBlock *InsertAtEnd);
GetElementPtrInst(Value *Ptr, Value* const *Idx, unsigned NumIdx,
const std::string &Name = "", Instruction *InsertBefore =0);
GetElementPtrInst(Value *Ptr, Value* const *Idx, unsigned NumIdx,
@@ -383,11 +379,6 @@ public:
Value* const *Idx, unsigned NumIdx,
bool AllowStructLeaf = false);
- static const Type *getIndexedType(const Type *Ptr,
- const std::vector<Value*> &Indices,
- bool AllowStructLeaf = false) {
- return getIndexedType(Ptr, &Indices[0], Indices.size(), AllowStructLeaf);
- }
static const Type *getIndexedType(const Type *Ptr, Value *Idx0, Value *Idx1,
bool AllowStructLeaf = false);
static const Type *getIndexedType(const Type *Ptr, Value *Idx);
@@ -698,7 +689,7 @@ public:
///
class CallInst : public Instruction {
CallInst(const CallInst &CI);
- void init(Value *Func, const std::vector<Value*> &Params);
+ void init(Value *Func, Value* const *Params, unsigned NumParams);
void init(Value *Func, Value *Actual1, Value *Actual2);
void init(Value *Func, Value *Actual);
void init(Value *Func);
diff --git a/lib/VMCore/Instructions.cpp b/lib/VMCore/Instructions.cpp
index 424e53e2bd..e02175585a 100644
--- a/lib/VMCore/Instructions.cpp
+++ b/lib/VMCore/Instructions.cpp
@@ -196,19 +196,19 @@ CallInst::~CallInst() {
delete [] OperandList;
}
-void CallInst::init(Value *Func, const std::vector<Value*> &Params) {
- NumOperands = Params.size()+1;
- Use *OL = OperandList = new Use[Params.size()+1];
+void CallInst::init(Value *Func, Value* const *Params, unsigned NumParams) {
+ NumOperands = NumParams+1;
+ Use *OL = OperandList = new Use[NumParams+1];
OL[0].init(Func, this);
const FunctionType *FTy =
cast<FunctionType>(cast<PointerType>(Func->getType())->getElementType());
FTy = FTy; // silence warning.
- assert((Params.size() == FTy->getNumParams() ||
- (FTy->isVarArg() && Params.size() > FTy->getNumParams())) &&
+ assert((NumParams == FTy->getNumParams() ||
+ (FTy->isVarArg() && NumParams > FTy->getNumParams())) &&
"Calling a function with bad signature!");
- for (unsigned i = 0, e = Params.size(); i != e; ++i) {
+ for (unsigned i = 0; i != NumParams; ++i) {
assert((i >= FTy->getNumParams() ||
FTy->getParamType(i) == Params[i]->getType()) &&
"Calling a function with a bad signature!");
@@ -273,7 +273,7 @@ CallInst::CallInst(Value *Func, const std::vector<Value*> &Params,
: Instruction(cast<FunctionType>(cast<PointerType>(Func->getType())
->getElementType())->getReturnType(),
Instruction::Call, 0, 0, Name, InsertBefore) {
- init(Func, Params);
+ init(Func, &Params[0], Params.size());
}
CallInst::CallInst(Value *Func, const std::vector<Value*> &Params,
@@ -281,7 +281,7 @@ CallInst::CallInst(Value *Func, const std::vector<Value*> &Params,
: Instruction(cast<FunctionType>(cast<PointerType>(Func->getType())
->getElementType())->getReturnType(),
Instruction::Call, 0, 0, Name, InsertAtEnd) {
- init(Func, Params);
+ init(Func, &Params[0], Params.size());
}
CallInst::CallInst(Value *Func, Value *Actual1, Value *Actual2,
@@ -713,23 +713,6 @@ void GetElementPtrInst::init(Value *Ptr, Value *Idx) {
OL[1].init(Idx, this);
}
-GetElementPtrInst::GetElementPtrInst(Value *Ptr, const std::vector<Value*> &Idx,
- const std::string &Name, Instruction *InBe)
- : Instruction(PointerType::get(checkType(getIndexedType(Ptr->getType(),
- &Idx[0], Idx.size(),
- true))),
- GetElementPtr, 0, 0, Name, InBe) {
- init(Ptr, &Idx[0], Idx.size());
-}
-
-GetElementPtrInst::GetElementPtrInst(Value *Ptr, const std::vector<Value*> &Idx,
- const std::string &Name, BasicBlock *IAE)
- : Instruction(PointerType::get(checkType(getIndexedType(Ptr->getType(),
- &Idx[0], Idx.size(),
- true))),
- GetElementPtr, 0, 0, Name, IAE) {
- init(Ptr, &Idx[0], Idx.size());
-}
GetElementPtrInst::GetElementPtrInst(Value *Ptr, Value* const *Idx,
unsigned NumIdx,