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 Sambucvoid bar() { foo(); } 12*f4a2713aSLionel Sambuc 13