1 ; Test that symbols starting with '?' are not affected by IR mangling.
3 ; RUN: llc -mtriple i686-pc-win32 < %s | FileCheck %s --check-prefix=COFF
4 ; RUN: llc -mtriple x86_64-pc-win32 < %s | FileCheck %s --check-prefix=COFF64
5 ; RUN: llc -mtriple i686-linux-gnu < %s | FileCheck %s --check-prefix=ELF
6 ; RUN: llc -mtriple i686-apple-darwin < %s | FileCheck %s --check-prefix=MACHO
8 ; Currently all object files allow escaping private symbols, but eventually we
9 ; might want to reject that.
11 ; COFF: calll "?withescape@A@@QBEXXZ"
12 ; COFF: calll "?withquestion@A@@QBEXXZ"
13 ; COFF: calll "L?privatequestion@A@@QBEXXZ"
14 ; COFF: calll "L?privatequestionfast@A@@QBEXXZ"
15 ; COFF: calll "?escapedprivate@A@@QBEXXZ"
17 ; COFF64: callq "?withescape@A@@QBEXXZ"
18 ; COFF64: callq "?withquestion@A@@QBEXXZ"
19 ; COFF64: callq ".L?privatequestion@A@@QBEXXZ"
20 ; COFF64: callq ".L?privatequestionfast@A@@QBEXXZ"
21 ; COFF64: callq "?escapedprivate@A@@QBEXXZ"
23 ; ELF: calll "?withescape@A@@QBEXXZ"
24 ; ELF: calll "?withquestion@A@@QBEXXZ"
25 ; ELF: calll ".L?privatequestion@A@@QBEXXZ"
26 ; ELF: calll ".L?privatequestionfast@A@@QBEXXZ"
27 ; ELF: calll "?escapedprivate@A@@QBEXXZ"
29 ; MACHO: calll "?withescape@A@@QBEXXZ"
30 ; MACHO: calll "_?withquestion@A@@QBEXXZ"
31 ; MACHO: calll "l_?privatequestion@A@@QBEXXZ"
32 ; MACHO: calll "l_?privatequestionfast@A@@QBEXXZ"
33 ; MACHO: calll "?escapedprivate@A@@QBEXXZ"
39 tail call void @"\01?withescape@A@@QBEXXZ"(ptr null)
40 tail call void @"?withquestion@A@@QBEXXZ"(ptr null)
41 tail call void @"?privatequestion@A@@QBEXXZ"(ptr null)
42 tail call x86_fastcallcc void @"?privatequestionfast@A@@QBEXXZ"(ptr null)
43 tail call void @"\01?escapedprivate@A@@QBEXXZ"(ptr null)
47 declare void @"\01?withescape@A@@QBEXXZ"(ptr)
48 declare void @"?withquestion@A@@QBEXXZ"(ptr)
50 define private void @"?privatequestion@A@@QBEXXZ"(ptr) {
54 define private x86_fastcallcc void @"?privatequestionfast@A@@QBEXXZ"(ptr) {
58 define private void @"\01?escapedprivate@A@@QBEXXZ"(ptr) {