mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 20:51:52 +01:00
1ba9070f0c
Now the Windows mangling modes ('w' and 'x') do not do any mangling for symbols starting with '?'. This means that clang can stop adding the hideous '\01' leading escape. This means LLVM debug logs are less likely to contain ASCII escape characters and it will be easier to copy and paste MS symbol names from IR. Finally. For non-Windows platforms, names starting with '?' still get IR mangling, so once clang stops escaping MS C++ names, we will get extra '_' prefixing on MachO. That's fine, since it is currently impossible to construct a triple that uses the MS C++ ABI in clang and emits macho object files. Differential Revision: https://reviews.llvm.org/D7775 llvm-svn: 327734
61 lines
2.1 KiB
LLVM
61 lines
2.1 KiB
LLVM
; Test that symbols starting with '?' are not affected by IR mangling.
|
|
|
|
; RUN: llc -mtriple i686-pc-win32 < %s | FileCheck %s --check-prefix=COFF
|
|
; RUN: llc -mtriple x86_64-pc-win32 < %s | FileCheck %s --check-prefix=COFF64
|
|
; RUN: llc -mtriple i686-linux-gnu < %s | FileCheck %s --check-prefix=ELF
|
|
; RUN: llc -mtriple i686-apple-darwin < %s | FileCheck %s --check-prefix=MACHO
|
|
|
|
; Currently all object files allow escaping private symbols, but eventually we
|
|
; might want to reject that.
|
|
|
|
; COFF: calll "?withescape@A@@QBEXXZ"
|
|
; COFF: calll "?withquestion@A@@QBEXXZ"
|
|
; COFF: calll "L?privatequestion@A@@QBEXXZ"
|
|
; COFF: calll "L?privatequestionfast@A@@QBEXXZ"
|
|
; COFF: calll "?escapedprivate@A@@QBEXXZ"
|
|
|
|
; COFF64: callq "?withescape@A@@QBEXXZ"
|
|
; COFF64: callq "?withquestion@A@@QBEXXZ"
|
|
; COFF64: callq ".L?privatequestion@A@@QBEXXZ"
|
|
; COFF64: callq ".L?privatequestionfast@A@@QBEXXZ"
|
|
; COFF64: callq "?escapedprivate@A@@QBEXXZ"
|
|
|
|
; ELF: calll "?withescape@A@@QBEXXZ"
|
|
; ELF: calll "?withquestion@A@@QBEXXZ"
|
|
; ELF: calll ".L?privatequestion@A@@QBEXXZ"
|
|
; ELF: calll ".L?privatequestionfast@A@@QBEXXZ"
|
|
; ELF: calll "?escapedprivate@A@@QBEXXZ"
|
|
|
|
; MACHO: calll "?withescape@A@@QBEXXZ"
|
|
; MACHO: calll "_?withquestion@A@@QBEXXZ"
|
|
; MACHO: calll "l_?privatequestion@A@@QBEXXZ"
|
|
; MACHO: calll "l_?privatequestionfast@A@@QBEXXZ"
|
|
; MACHO: calll "?escapedprivate@A@@QBEXXZ"
|
|
|
|
%struct.A = type {}
|
|
|
|
define i32 @main() {
|
|
entry:
|
|
tail call void @"\01?withescape@A@@QBEXXZ"(%struct.A* null)
|
|
tail call void @"?withquestion@A@@QBEXXZ"(%struct.A* null)
|
|
tail call void @"?privatequestion@A@@QBEXXZ"(%struct.A* null)
|
|
tail call x86_fastcallcc void @"?privatequestionfast@A@@QBEXXZ"(%struct.A* null)
|
|
tail call void @"\01?escapedprivate@A@@QBEXXZ"(%struct.A* null)
|
|
ret i32 0
|
|
}
|
|
|
|
declare void @"\01?withescape@A@@QBEXXZ"(%struct.A*)
|
|
declare void @"?withquestion@A@@QBEXXZ"(%struct.A*)
|
|
|
|
define private void @"?privatequestion@A@@QBEXXZ"(%struct.A*) {
|
|
ret void
|
|
}
|
|
|
|
define private x86_fastcallcc void @"?privatequestionfast@A@@QBEXXZ"(%struct.A*) {
|
|
ret void
|
|
}
|
|
|
|
define private void @"\01?escapedprivate@A@@QBEXXZ"(%struct.A*) {
|
|
ret void
|
|
}
|