Home | History | Annotate | Download | only in COFF
      1 ; Check how tricky symbols are printed in the asm output.
      2 ; RUN: llc -mtriple=i686-pc-win32 %s -o - | FileCheck %s --check-prefix=ASM
      3 ; RUN: llc -mtriple=i686-pc-win32 %s -x86-asm-syntax=intel -o - | FileCheck %s --check-prefix=ASM
      4 
      5 ; Check that we can roundtrip these names through our assembler,
      6 ; in both at&t and intel syntax.
      7 ; RUN: llc -mtriple=i686-pc-win32 %s -o - | llvm-mc -triple i686-pc-win32 -filetype=obj | llvm-readobj -t | FileCheck %s --check-prefix=READOBJ
      8 ; RUN: llc -mtriple=i686-pc-win32 -x86-asm-syntax=intel %s -o - | llvm-mc -triple i686-pc-win32 -filetype=obj | llvm-readobj -t | FileCheck %s --check-prefix=READOBJ
      9 
     10 
     11 @"\01??__E_Generic_object@?$_Error_objects@H@std@@YAXXZ" = global i32 0
     12 @"\01__ZL16ExceptionHandlerP19_EXCEPTION_POINTERS@4" = global i32 0
     13 @"\01 (a] foo.bar" = global i32 0
     14 
     15 define weak i32 @"\01??_B?$num_put@_WV?$back_insert_iterator@V?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@@std@@@std@@51"() section ".text" {
     16   %a = load i32, i32* @"\01??__E_Generic_object@?$_Error_objects@H@std@@YAXXZ"
     17   %b = load i32, i32* @"\01__ZL16ExceptionHandlerP19_EXCEPTION_POINTERS@4"
     18   %c = load i32, i32* @"\01 (a] foo.bar"
     19   %x = add i32 %a, %b
     20   %y = add i32 %x, %c
     21   ret i32 %y
     22 }
     23 
     24 ; Check that these symbols are not quoted. They occur in output that gets passed to GAS.
     25 ; ASM: .globl __ZL16ExceptionHandlerP19_EXCEPTION_POINTERS@4
     26 ; ASM-NOT: .globl "__ZL16ExceptionHandlerP19_EXCEPTION_POINTERS@4"
     27 ; ASM: .globl @foo.bar
     28 ; ASM-NOT: .globl "@foo.bar"
     29 
     30 ; READOBJ: Symbol
     31 ; READOBJ: Name: .text
     32 ; READOBJ: Section: .text
     33 ; READOBJ: Symbol
     34 ; READOBJ: Name: ??_B?$num_put@_WV?$back_insert_iterator@V?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@@std@@@std@@51
     35 ; READOBJ: Section: .text
     36 ; READOBJ: Symbol
     37 ; READOBJ: Name: ??__E_Generic_object@?$_Error_objects@H@std@@YAXXZ
     38 ; READOBJ: Symbol
     39 ; READOBJ: Name: __ZL16ExceptionHandlerP19_EXCEPTION_POINTERS@4
     40 ; READOBJ: Symbol
     41 ; READOBJ: Name: @foo.bar
     42