File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 1+ // MIPS assembler uses the label prefix `$anon.` for local anonymous variables
2+ // other architectures (including ARM and x86-64) use the prefix `.Lanon.`
13//@ only-linux
24//@ assembly-output: emit-asm
35//@ compile-flags: --crate-type=lib -Copt-level=3
68use std:: ffi:: CStr ;
79
810// CHECK: .section .rodata.str1.{{[12]}},"aMS"
9- // CHECK: .Lanon .{{.+}}:
11+ // CHECK: {{(\.L|\$)}}anon .{{.+}}:
1012// CHECK-NEXT: .asciz "foo"
1113#[ unsafe( no_mangle) ]
1214static CSTR : & [ u8 ; 4 ] = b"foo\0 " ;
1315
1416// CHECK-NOT: .section
15- // CHECK: .Lanon .{{.+}}:
17+ // CHECK: {{(\.L|\$)}}anon .{{.+}}:
1618// CHECK-NEXT: .asciz "bar"
1719#[ unsafe( no_mangle) ]
1820pub fn cstr ( ) -> & ' static CStr {
1921 c"bar"
2022}
2123
2224// CHECK-NOT: .section
23- // CHECK: .Lanon .{{.+}}:
25+ // CHECK: {{(\.L|\$)}}anon .{{.+}}:
2426// CHECK-NEXT: .asciz "baz"
2527#[ unsafe( no_mangle) ]
2628pub fn manual_cstr ( ) -> & ' static str {
You can’t perform that action at this time.
0 commit comments