2007-04-16 04:08:37 +08:00
|
|
|
// RUN: %llvmgcc -O3 -S -o - -emit-llvm %s | grep extern_weak
|
2009-12-05 08:02:37 +08:00
|
|
|
// RUN: %llvmgcc -O3 -S -o - -emit-llvm %s | llc
|
2006-12-01 15:14:26 +08:00
|
|
|
|
2007-11-27 14:23:59 +08:00
|
|
|
#if !defined(__linux__) && !defined(__FreeBSD__) && \
|
2008-06-26 18:36:58 +08:00
|
|
|
!defined(__OpenBSD__) && !defined(__CYGWIN__) && !defined(__DragonFly__)
|
2006-12-01 15:14:26 +08:00
|
|
|
void foo() __attribute__((weak_import));
|
|
|
|
#else
|
|
|
|
void foo() __attribute__((weak));
|
|
|
|
#endif
|
|
|
|
|
|
|
|
void bar() { foo(); }
|
|
|
|
|