Use weak_import on linux, weak everywhere else. Makes test pass on Linux.
[oota-llvm.git] / test / CFrontend / extern-weak.c
1 // RUN: %llvmgcc -O3 -S -o - -emit-llvm %s | grep extern_weak &&
2 // RUN: %llvmgcc -O3 -S -o - -emit-llvm | llvm-as | llc
3
4 #ifndef __linux__
5 void foo() __attribute__((weak_import));
6 #else
7 void foo() __attribute__((weak));
8 #endif
9
10 void bar() { foo(); }
11