File tree 1 file changed +5
-3
lines changed
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.`
1
3
//@ only-linux
2
4
//@ assembly-output: emit-asm
3
5
//@ compile-flags: --crate-type=lib -Copt-level=3
6
8
use std:: ffi:: CStr ;
7
9
8
10
// CHECK: .section .rodata.str1.{{[12]}},"aMS"
9
- // CHECK: .Lanon .{{.+}}:
11
+ // CHECK: {{(\.L|\$)}}anon .{{.+}}:
10
12
// CHECK-NEXT: .asciz "foo"
11
13
#[ unsafe( no_mangle) ]
12
14
static CSTR : & [ u8 ; 4 ] = b"foo\0 " ;
13
15
14
16
// CHECK-NOT: .section
15
- // CHECK: .Lanon .{{.+}}:
17
+ // CHECK: {{(\.L|\$)}}anon .{{.+}}:
16
18
// CHECK-NEXT: .asciz "bar"
17
19
#[ unsafe( no_mangle) ]
18
20
pub fn cstr ( ) -> & ' static CStr {
19
21
c"bar"
20
22
}
21
23
22
24
// CHECK-NOT: .section
23
- // CHECK: .Lanon .{{.+}}:
25
+ // CHECK: {{(\.L|\$)}}anon .{{.+}}:
24
26
// CHECK-NEXT: .asciz "baz"
25
27
#[ unsafe( no_mangle) ]
26
28
pub fn manual_cstr ( ) -> & ' static str {
You can’t perform that action at this time.
0 commit comments