From 92905d95a0cc0be3c191552206bc8ad3c139b110 Mon Sep 17 00:00:00 2001 From: Reid Spencer Date: Wed, 31 Jan 2007 22:30:26 +0000 Subject: [PATCH] Fix build breakage by using correct arguments to getIndexedType in the GEP constructors. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33726 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/VMCore/Instructions.cpp | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/lib/VMCore/Instructions.cpp b/lib/VMCore/Instructions.cpp index d830dfd685f..39eebe67174 100644 --- a/lib/VMCore/Instructions.cpp +++ b/lib/VMCore/Instructions.cpp @@ -711,7 +711,8 @@ void GetElementPtrInst::init(Value *Ptr, Value *Idx) { GetElementPtrInst::GetElementPtrInst(Value *Ptr, const std::vector &Idx, const std::string &Name, Instruction *InBe) : Instruction(PointerType::get(checkType(getIndexedType(Ptr->getType(), - Idx, true))), + &Idx[0], Idx.size(), + true))), GetElementPtr, 0, 0, Name, InBe) { init(Ptr, &Idx[0], Idx.size()); } @@ -719,7 +720,8 @@ GetElementPtrInst::GetElementPtrInst(Value *Ptr, const std::vector &Idx, GetElementPtrInst::GetElementPtrInst(Value *Ptr, const std::vector &Idx, const std::string &Name, BasicBlock *IAE) : Instruction(PointerType::get(checkType(getIndexedType(Ptr->getType(), - Idx, true))), + &Idx[0], Idx.size(), + true))), GetElementPtr, 0, 0, Name, IAE) { init(Ptr, &Idx[0], Idx.size()); } @@ -728,7 +730,7 @@ GetElementPtrInst::GetElementPtrInst(Value *Ptr, Value* const *Idx, unsigned NumIdx, const std::string &Name, Instruction *InBe) : Instruction(PointerType::get(checkType(getIndexedType(Ptr->getType(), - Idx, true))), + Idx, NumIdx, true))), GetElementPtr, 0, 0, Name, InBe) { init(Ptr, Idx, NumIdx); } @@ -737,21 +739,23 @@ GetElementPtrInst::GetElementPtrInst(Value *Ptr, Value* const *Idx, unsigned NumIdx, const std::string &Name, BasicBlock *IAE) : Instruction(PointerType::get(checkType(getIndexedType(Ptr->getType(), - Idx, true))), + Idx, NumIdx, true))), GetElementPtr, 0, 0, Name, IAE) { init(Ptr, Idx, NumIdx); } GetElementPtrInst::GetElementPtrInst(Value *Ptr, Value *Idx, const std::string &Name, Instruction *InBe) - : Instruction(PointerType::get(checkType(getIndexedType(Ptr->getType(),Idx))), + : Instruction(PointerType::get(checkType(getIndexedType(Ptr->getType(), + Idx))), GetElementPtr, 0, 0, Name, InBe) { init(Ptr, Idx); } GetElementPtrInst::GetElementPtrInst(Value *Ptr, Value *Idx, const std::string &Name, BasicBlock *IAE) - : Instruction(PointerType::get(checkType(getIndexedType(Ptr->getType(),Idx))), + : Instruction(PointerType::get(checkType(getIndexedType(Ptr->getType(), + Idx))), GetElementPtr, 0, 0, Name, IAE) { init(Ptr, Idx); }