summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2008-05-31 19:11:15 +0000
committerDan Gohman <gohman@apple.com>2008-05-31 19:11:15 +0000
commitca0256abb26dd11507a7f484632284a811681ba6 (patch)
treefe797faf7c31971484b38e8e5a1716abf418f4df /llvm/lib/Bitcode/Reader/BitcodeReader.cpp
parent4b1c1a46a690d9a1933a7c81b30f0cc8188d7402 (diff)
downloadbcm5719-llvm-ca0256abb26dd11507a7f484632284a811681ba6.tar.gz
bcm5719-llvm-ca0256abb26dd11507a7f484632284a811681ba6.zip
Improved bitcode support for insertvalue/extractvalue.
llvm-svn: 51822
Diffstat (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.cpp')
-rw-r--r--llvm/lib/Bitcode/Reader/BitcodeReader.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
index 60767bdbe5e..3fc6b175217 100644
--- a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
+++ b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
@@ -774,7 +774,7 @@ bool BitcodeReader::ParseConstants() {
// CE_EXTRACTVAL: [opty, opval, n x indices]
const Type *AggTy = getTypeByID(Record[0]);
if (!AggTy || !AggTy->isAggregateType())
- return Error("Invalid CE_INSERTVAL record");
+ return Error("Invalid CE_EXTRACTVAL record");
Constant *Agg = ValueList.getConstantFwdRef(Record[1], AggTy);
SmallVector<unsigned, 4> Indices;
for (unsigned i = 2, e = Record.size(); i != e; ++i) {
@@ -796,7 +796,7 @@ bool BitcodeReader::ParseConstants() {
return Error("Invalid CE_INSERTVAL record");
Constant *Agg = ValueList.getConstantFwdRef(Record[1], AggTy);
const Type *ValTy = getTypeByID(Record[2]);
- Constant *Val = ValueList.getConstantFwdRef(Record[2], ValTy);
+ Constant *Val = ValueList.getConstantFwdRef(Record[3], ValTy);
SmallVector<unsigned, 4> Indices;
for (unsigned i = 4, e = Record.size(); i != e; ++i) {
uint64_t Index = Record[i];
OpenPOWER on IntegriCloud