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 committed 2021-02-11 22:29:03 -05:00
1 parent de035c18cf
commit db00953ff3
1 file changed
+1 -1
+1 -1
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;
}