30 lines · plain
1; RUN: llvm-as < %s | llvm-dis | FileCheck %s2; RUN: verify-uselistorder %s3 4!0 = !{!"zero"}5!1 = !{!"one"}6!2 = !{!"two"}7 8!foo = !{!0, !1, !2}9; CHECK: !foo = !{!0, !1, !2}10 11!\23pragma = !{!0, !1, !2}12; CHECK: !\23pragma = !{!0, !1, !2}13 14; \31 is the digit '1'. On emission, we escape the first character (to avoid15; conflicting with anonymous metadata), but not the subsequent ones.16!\31\31\31 = !{!0, !1, !2}17; CHECK: !\3111 = !{!0, !1, !2}18 19!\22name\22 = !{!0, !1, !2}20; CHECK: !\22name\22 = !{!0, !1, !2}21 22; \x doesn't mean anything, so we parse it literally but escape the \ into \5C23; when emitting it, followed by xfoo.24!\xfoo = !{!0, !1, !2}25; CHECK: !\5Cxfoo = !{!0, !1, !2}26 27; Make sure we handle escapes with the high bit set correctly.28!\FFfoo = !{!0, !1, !2}29; CHECK: !\FFfoo = !{!0, !1, !2}30