YouCompleteMe/cpp/llvm/tools/clang/test/CodeGen/extern-weak.c
Strahinja Val Markovic 1f51a89d39 Adding more llvm/clang files
These were ignored by git accidentally. We want ALL OF THEM since they all came
in the llvm/clang source distribution.
2012-07-05 17:55:45 -07:00

13 lines
353 B
C

// RUN: %clang_cc1 -O3 -emit-llvm -o - %s | grep extern_weak
// RUN: %clang_cc1 -O3 -emit-llvm -o - %s | llc
#if !defined(__linux__) && !defined(__FreeBSD__) && \
!defined(__OpenBSD__) && !defined(__CYGWIN__) && !defined(__DragonFly__)
void foo() __attribute__((weak_import));
#else
void foo() __attribute__((weak));
#endif
void bar() { foo(); }