2006-12-02 02:04:08 +08:00
|
|
|
// RUN: %llvmgcc -O3 -S -o - -emit-llvm %s | grep extern_weak &&
|
|
|
|
// RUN: %llvmgcc -O3 -S -o - -emit-llvm | llvm-as | llc
|
2006-12-01 15:14:26 +08:00
|
|
|
|
2007-04-05 06:07:44 +08:00
|
|
|
#if !defined(__linux__) && !defined(__FreeBSD__) && !defined(__OpenBSD__)
|
2006-12-01 15:14:26 +08:00
|
|
|
void foo() __attribute__((weak_import));
|
|
|
|
#else
|
|
|
|
void foo() __attribute__((weak));
|
|
|
|
#endif
|
|
|
|
|
|
|
|
void bar() { foo(); }
|
|
|
|
|