mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-16 12:24:03 +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:
9
test/Bitcode/mdstring-high-bits.ll
Normal file
9
test/Bitcode/mdstring-high-bits.ll
Normal file
@ -0,0 +1,9 @@
|
||||
; RUN: llvm-as < %s | llvm-dis | FileCheck %s
|
||||
|
||||
; PR21882: confirm we don't crash when high bits are set in a character in a
|
||||
; metadata string.
|
||||
|
||||
; CHECK: !name = !{!0}
|
||||
!name = !{!0}
|
||||
; CHECK: !0 = metadata !{metadata !"\80"}
|
||||
!0 = metadata !{metadata !"\80"}
|
Reference in New Issue
Block a user