diff options
author | Dan Gohman <gohman@apple.com> | 2008-05-31 19:11:15 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2008-05-31 19:11:15 +0000 |
commit | aa91c1d739629e930071eadefaf70478f829e7c1 (patch) | |
tree | 06c7924564550ee0a8b7c4f73ff78d611c77f002 /lib/Bitcode/Reader | |
parent | f0bbb440b19963b39a2adcf07c2fb177554d1d9b (diff) | |
download | external_llvm-aa91c1d739629e930071eadefaf70478f829e7c1.zip external_llvm-aa91c1d739629e930071eadefaf70478f829e7c1.tar.gz external_llvm-aa91c1d739629e930071eadefaf70478f829e7c1.tar.bz2 |
Improved bitcode support for insertvalue/extractvalue.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51822 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Bitcode/Reader')
-rw-r--r-- | lib/Bitcode/Reader/BitcodeReader.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Bitcode/Reader/BitcodeReader.cpp b/lib/Bitcode/Reader/BitcodeReader.cpp index 60767bd..3fc6b17 100644 --- a/lib/Bitcode/Reader/BitcodeReader.cpp +++ b/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]; |