13 lines · c
1// RUN: %clang_cc1 -O3 -emit-llvm -o - %s | grep extern_weak2// RUN: %clang_cc1 -O3 -emit-llvm -o - %s | llc3 4#if !defined(__linux__) && !defined(__FreeBSD__) && \5 !defined(__OpenBSD__) && !defined(__CYGWIN__) && !defined(__DragonFly__)6void foo(void) __attribute__((weak_import));7#else8void foo(void) __attribute__((weak));9#endif10 11void bar(void) { foo(); }12 13