Fix bitcode decoder error in "Encode alignment attribute for `atomicrmw`"

The wrong record field number was being used in bitcode decoding,
which broke a self-hosted LTO build. (Yet, somehow, this _doesn't_
seem to have broken simple bitcode encode/decode roundtrip tests, and
I'm not sure why...)

Fixes commit d06ab79816
This commit is contained in:
James Y Knight 2021-02-11 22:26:12 -05:00
parent de035c18cf
commit db00953ff3
1 changed files with 1 additions and 1 deletions

View File

@ -5181,7 +5181,7 @@ Error BitcodeReader::parseFunctionBody(Function *F) {
MaybeAlign Alignment;
if (NumRecords == (OpNum + 5)) {
if (Error Err = parseAlignmentValue(Record[6], Alignment))
if (Error Err = parseAlignmentValue(Record[OpNum + 4], Alignment))
return Err;
}