llvm/test/MC/COFF/weak.s
Chandler Carruth a4a2a03c31 Remove some hard coded CR-LFs. Some of these were the entire files, one of
these was just one line of a file. Explicitly set the eol-style property on the
files to try and ensure this fix stays.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130125 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-25 07:11:23 +00:00

52 lines
1.7 KiB
ArmAsm

// This tests that default-null weak symbols (a GNU extension) are created
// properly via the .weak directive.
// RUN: llvm-mc -filetype=obj -triple i686-pc-win32 < %s | coff-dump.py | FileCheck %s
.def _main;
.scl 2;
.type 32;
.endef
.text
.globl _main
.align 16, 0x90
_main: # @main
# BB#0: # %entry
subl $4, %esp
movl $_test_weak, %eax
testl %eax, %eax
je LBB0_2
# BB#1: # %if.then
calll _test_weak
movl $1, %eax
addl $4, %esp
ret
LBB0_2: # %return
xorl %eax, %eax
addl $4, %esp
ret
.weak _test_weak
// CHECK: Symbols = [
// CHECK: Name = _test_weak
// CHECK-NEXT: Value = 0
// CHECK-NEXT: SectionNumber = 0
// CHECK-NEXT: SimpleType = IMAGE_SYM_TYPE_NULL (0)
// CHECK-NEXT: ComplexType = IMAGE_SYM_DTYPE_NULL (0)
// CHECK-NEXT: StorageClass = IMAGE_SYM_CLASS_WEAK_EXTERNAL (105)
// CHECK-NEXT: NumberOfAuxSymbols = 1
// CHECK-NEXT: AuxillaryData =
// CHECK-NEXT: 05 00 00 00 02 00 00 00 - 00 00 00 00 00 00 00 00 |................|
// CHECK-NEXT: 00 00 |..|
// CHECK: Name = .weak._test_weak.default
// CHECK-NEXT: Value = 0
// CHECK-NEXT: SectionNumber = 65535
// CHECK-NEXT: SimpleType = IMAGE_SYM_TYPE_NULL (0)
// CHECK-NEXT: ComplexType = IMAGE_SYM_DTYPE_NULL (0)
// CHECK-NEXT: StorageClass = IMAGE_SYM_CLASS_EXTERNAL (2)
// CHECK-NEXT: NumberOfAuxSymbols = 0
// CHECK-NEXT: AuxillaryData =