fix a bitcode reader bug where it can't handle extractelement correctly:
the index of the value being extracted is always an i32. This fixes PR3465
llvm-svn: 63597
diff --git a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
index 8770028..adffe82 100644
--- a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
+++ b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
@@ -915,8 +915,7 @@
dyn_cast_or_null<VectorType>(getTypeByID(Record[0]));
if (OpTy == 0) return Error("Invalid CE_EXTRACTELT record");
Constant *Op0 = ValueList.getConstantFwdRef(Record[1], OpTy);
- Constant *Op1 = ValueList.getConstantFwdRef(Record[2],
- OpTy->getElementType());
+ Constant *Op1 = ValueList.getConstantFwdRef(Record[2], Type::Int32Ty);
V = ConstantExpr::getExtractElement(Op0, Op1);
break;
}