mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-12 13:38:21 +00:00
Bitcode: Use unsigned char to record MDStrings
`MDString`s can have arbitrary characters in them. Prevent an assertion that fired in `BitcodeWriter` because of sign extension by copying the characters into the record as `unsigned char`s. Based on a patch by Keno Fischer; fixes PR21882. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224077 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -800,7 +800,7 @@ static void WriteModuleMetadata(const Module *M,
|
||||
}
|
||||
|
||||
// Code: [strchar x N]
|
||||
Record.append(MDS->begin(), MDS->end());
|
||||
Record.append(MDS->bytes_begin(), MDS->bytes_end());
|
||||
|
||||
// Emit the finished record.
|
||||
Stream.EmitRecord(bitc::METADATA_STRING, Record, MDSAbbrev);
|
||||
|
Reference in New Issue
Block a user