mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-26 00:46:06 +00:00

On platforms where char is signed, the ">> 4" shift will produce incorrect results. We were already working on unsigned char for most characters, but not for the first one. Fixes https://github.com/llvm/llvm-project/issues/74732.
30 lines
807 B
LLVM
30 lines
807 B
LLVM
; RUN: llvm-as < %s | llvm-dis | FileCheck %s
|
|
; RUN: verify-uselistorder %s
|
|
|
|
!0 = !{!"zero"}
|
|
!1 = !{!"one"}
|
|
!2 = !{!"two"}
|
|
|
|
!foo = !{!0, !1, !2}
|
|
; CHECK: !foo = !{!0, !1, !2}
|
|
|
|
!\23pragma = !{!0, !1, !2}
|
|
; CHECK: !\23pragma = !{!0, !1, !2}
|
|
|
|
; \31 is the digit '1'. On emission, we escape the first character (to avoid
|
|
; conflicting with anonymous metadata), but not the subsequent ones.
|
|
!\31\31\31 = !{!0, !1, !2}
|
|
; CHECK: !\3111 = !{!0, !1, !2}
|
|
|
|
!\22name\22 = !{!0, !1, !2}
|
|
; CHECK: !\22name\22 = !{!0, !1, !2}
|
|
|
|
; \x doesn't mean anything, so we parse it literally but escape the \ into \5C
|
|
; when emitting it, followed by xfoo.
|
|
!\xfoo = !{!0, !1, !2}
|
|
; CHECK: !\5Cxfoo = !{!0, !1, !2}
|
|
|
|
; Make sure we handle escapes with the high bit set correctly.
|
|
!\FFfoo = !{!0, !1, !2}
|
|
; CHECK: !\FFfoo = !{!0, !1, !2}
|