reference, declarationdefinition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced
    1
    2
    3
    4
    5
    6
    7
    8
    9
   10
   11
   12
   13
   14
   15
   16
   17
   18
   19
   20
   21
   22
   23
   24
   25
   26
   27
   28
   29
   30
   31
   32
   33
   34
   35
   36
   37
   38
   39
   40
   41
   42
   43
   44
   45
   46
   47
   48
   49
   50
   51
   52
   53
   54
   55
   56
   57
   58
   59
   60
; 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
}