blob: 4729b048fbe0381424c5be3ae1fc4bb3ad2de345 [file] [log] [blame]
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001// RUN: %llvmgcc -O3 -S -o - -emit-llvm %s | grep extern_weak
Dan Gohman2b62af22009-12-05 00:02:37 +00002// RUN: %llvmgcc -O3 -S -o - -emit-llvm %s | llc
Dan Gohmanf17a25c2007-07-18 16:29:46 +00003
Zhou Sheng4b97e6d2007-11-27 06:23:59 +00004#if !defined(__linux__) && !defined(__FreeBSD__) && \
Matthijs Kooijman331217d2008-06-26 10:36:58 +00005 !defined(__OpenBSD__) && !defined(__CYGWIN__) && !defined(__DragonFly__)
Dan Gohmanf17a25c2007-07-18 16:29:46 +00006void foo() __attribute__((weak_import));
7#else
8void foo() __attribute__((weak));
9#endif
10
11void bar() { foo(); }
12