[BitcodeReader] Fix use-after-move

This commit is contained in:
Fangrui Song
2022-02-14 10:54:37 -08:00
parent de54e4ab78
commit edf4780ad1

View File

@@ -831,7 +831,7 @@ BitcodeReader::BitcodeReader(BitstreamCursor Stream, StringRef Strtab,
StringRef ProducerIdentification,
LLVMContext &Context)
: BitcodeReaderBase(std::move(Stream), Strtab), Context(Context),
ValueList(Context, Stream.SizeInBytes()) {
ValueList(Context, this->Stream.SizeInBytes()) {
this->ProducerIdentification = std::string(ProducerIdentification);
}