From 35651cdf0bbd474349e680a341dbf235bcdb4608 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Sat, 31 May 2008 19:09:08 +0000 Subject: Fix some bugs with the handling of indices in insertvalue/extractvalue. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51820 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/VMCore/Constants.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/VMCore/Constants.cpp') diff --git a/lib/VMCore/Constants.cpp b/lib/VMCore/Constants.cpp index e15e68a..9c10e75 100644 --- a/lib/VMCore/Constants.cpp +++ b/lib/VMCore/Constants.cpp @@ -551,7 +551,7 @@ public: Op<0>() = Agg; } - /// Indicies - These identify which value to extract. + /// Indices - These identify which value to extract. const SmallVector Indices; /// Transparently provide more efficient getOperand methods. @@ -577,7 +577,7 @@ public: Op<1>() = Val; } - /// Indicies - These identify the position for the insertion. + /// Indices - These identify the position for the insertion. const SmallVector Indices; /// Transparently provide more efficient getOperand methods. @@ -2339,7 +2339,7 @@ Constant *ConstantExpr::getExtractValueTy(const Type *ReqTy, Constant *Agg, // Look up the constant in the table first to ensure uniqueness std::vector ArgVec; ArgVec.push_back(Agg); - SmallVector Indices; + SmallVector Indices(Idxs, Idxs + NumIdx); const ExprMapKeyType Key(Instruction::ExtractValue, ArgVec, 0, Indices); return ExprConstants->getOrCreate(ReqTy, Key); } -- cgit v1.1