xref: /minix3/external/bsd/llvm/dist/clang/test/CodeGen/extern-weak.c (revision f4a2713ac843a11c696ec80c0a5e3e5d80b4d338)
1*f4a2713aSLionel Sambuc // RUN: %clang_cc1 -O3 -emit-llvm -o - %s | grep extern_weak
2*f4a2713aSLionel Sambuc // RUN: %clang_cc1 -O3 -emit-llvm -o - %s | llc
3*f4a2713aSLionel Sambuc 
4*f4a2713aSLionel Sambuc #if !defined(__linux__) && !defined(__FreeBSD__) && \
5*f4a2713aSLionel Sambuc     !defined(__OpenBSD__) && !defined(__CYGWIN__) && !defined(__DragonFly__)
6*f4a2713aSLionel Sambuc void foo() __attribute__((weak_import));
7*f4a2713aSLionel Sambuc #else
8*f4a2713aSLionel Sambuc void foo() __attribute__((weak));
9*f4a2713aSLionel Sambuc #endif
10*f4a2713aSLionel Sambuc 
bar()11*f4a2713aSLionel Sambuc void bar() { foo(); }
12*f4a2713aSLionel Sambuc 
13