aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Bitcode
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-02-03 02:11:28 +0000
committerChris Lattner <sabre@nondot.org>2009-02-03 02:11:28 +0000
commitba120aa5fa94f3d33afb33c63a43c3ff046a93b4 (patch)
tree53376ecfb9ac120faa2e18d0449b4526eae1ab70 /lib/Bitcode
parent3d730f7453af5ecb1be4b8c5d48843ad5637de37 (diff)
downloadexternal_llvm-ba120aa5fa94f3d33afb33c63a43c3ff046a93b4.zip
external_llvm-ba120aa5fa94f3d33afb33c63a43c3ff046a93b4.tar.gz
external_llvm-ba120aa5fa94f3d33afb33c63a43c3ff046a93b4.tar.bz2
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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63597 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Bitcode')
-rw-r--r--lib/Bitcode/Reader/BitcodeReader.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/Bitcode/Reader/BitcodeReader.cpp b/lib/Bitcode/Reader/BitcodeReader.cpp
index 8770028..adffe82 100644
--- a/lib/Bitcode/Reader/BitcodeReader.cpp
+++ b/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;
}