[llvm-commits] CVS: llvm/lib/VMCore/Instructions.cpp
Chris Lattner
sabre at nondot.org
Mon Feb 12 16:59:02 PST 2007
Changes in directory llvm/lib/VMCore:
Instructions.cpp updated: 1.71 -> 1.72
---
Log message:
remove some dead methods.
---
Diffs of the changes: (+8 -25)
Instructions.cpp | 33 ++++++++-------------------------
1 files changed, 8 insertions(+), 25 deletions(-)
Index: llvm/lib/VMCore/Instructions.cpp
diff -u llvm/lib/VMCore/Instructions.cpp:1.71 llvm/lib/VMCore/Instructions.cpp:1.72
--- llvm/lib/VMCore/Instructions.cpp:1.71 Thu Feb 1 20:16:22 2007
+++ llvm/lib/VMCore/Instructions.cpp Mon Feb 12 18:58:44 2007
@@ -196,19 +196,19 @@
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 @@
: 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 @@
: 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 @@
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,
More information about the llvm-commits
mailing list