// This tests that default-null weak are created
// properly via the .weak directive.
// RUN: llvm-mc -filetype=obj -triple i686-pc-win32 %s | llvm-readobj --symbols - | FileCheck %s
// RUN: llvm-mc -filetype=obj -triple x86_64-pc-win32 %s | llvm-readobj --symbols - | 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
call _test_weak
movl $1, %eax
addl $4, %esp
ret
LBB0_2: # %return
xorl %eax, %eax
addl $4, %esp
ret
.weak _test_weak
.weak _test_weak_alias
_test_weak_alias=_main
.weak weakfunc
.globl weakfunc
weakfunc:
ret
// CHECK: Symbols