diff options
| author | Dan Gohman <gohman@apple.com> | 2010-01-25 21:55:39 +0000 |
|---|---|---|
| committer | Dan Gohman <gohman@apple.com> | 2010-01-25 21:55:39 +0000 |
| commit | 7fb6c5d677ec945129f1fe9a881a59bb819dc948 (patch) | |
| tree | 8f2abd4e8c099783c4414456acc9ec0e098ede5f /lib/Bitcode | |
| parent | 3dac341cc4f36feb2da4f1faade5721bb61f679a (diff) | |
| download | external_llvm-7fb6c5d677ec945129f1fe9a881a59bb819dc948.zip external_llvm-7fb6c5d677ec945129f1fe9a881a59bb819dc948.tar.gz external_llvm-7fb6c5d677ec945129f1fe9a881a59bb819dc948.tar.bz2 | |
Fix the bitcode reader to deserialize nuw/nsw/etc. bits properly in the case
of a forward-reference, which doesn't use an "abbrev" encoding.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94454 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Bitcode')
| -rw-r--r-- | lib/Bitcode/Reader/BitcodeReader.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Bitcode/Reader/BitcodeReader.cpp b/lib/Bitcode/Reader/BitcodeReader.cpp index 2549a51..6dae45f 100644 --- a/lib/Bitcode/Reader/BitcodeReader.cpp +++ b/lib/Bitcode/Reader/BitcodeReader.cpp @@ -1702,12 +1702,12 @@ bool BitcodeReader::ParseFunctionBody(Function *F) { if (Opc == Instruction::Add || Opc == Instruction::Sub || Opc == Instruction::Mul) { - if (Record[3] & (1 << bitc::OBO_NO_SIGNED_WRAP)) + if (Record[OpNum] & (1 << bitc::OBO_NO_SIGNED_WRAP)) cast<BinaryOperator>(I)->setHasNoSignedWrap(true); - if (Record[3] & (1 << bitc::OBO_NO_UNSIGNED_WRAP)) + if (Record[OpNum] & (1 << bitc::OBO_NO_UNSIGNED_WRAP)) cast<BinaryOperator>(I)->setHasNoUnsignedWrap(true); } else if (Opc == Instruction::SDiv) { - if (Record[3] & (1 << bitc::SDIV_EXACT)) + if (Record[OpNum] & (1 << bitc::SDIV_EXACT)) cast<BinaryOperator>(I)->setIsExact(true); } } |
