diff options
author | Chris Lattner <sabre@nondot.org> | 2009-02-03 02:11:28 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-02-03 02:11:28 +0000 |
commit | fa4e35aca7dba138e9df5f6939238a91f2036486 (patch) | |
tree | e55729ee3ce15870fd860dec255e2b79b9456e0e /llvm/lib/Bitcode/Reader/BitcodeReader.cpp | |
parent | 6aa6b1f263e09f16f348bd65cd97ca1e1feba3da (diff) | |
download | bcm5719-llvm-fa4e35aca7dba138e9df5f6939238a91f2036486.tar.gz bcm5719-llvm-fa4e35aca7dba138e9df5f6939238a91f2036486.zip |
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
Diffstat (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.cpp')
-rw-r--r-- | llvm/lib/Bitcode/Reader/BitcodeReader.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp index 87700284c48..adffe829202 100644 --- a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp +++ b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp @@ -915,8 +915,7 @@ bool BitcodeReader::ParseConstants() { 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; } |