xref: /minix3/external/bsd/llvm/dist/clang/test/CodeGen/attr-used.c (revision f4a2713ac843a11c696ec80c0a5e3e5d80b4d338)
1*f4a2713aSLionel Sambuc // RUN: %clang_cc1 -emit-llvm -o %t %s
2*f4a2713aSLionel Sambuc // RUN: grep '@llvm.used = .*@g0' %t
3*f4a2713aSLionel Sambuc // RUN: grep '@llvm.used = .*@f0' %t
4*f4a2713aSLionel Sambuc // RUN: grep '@llvm.used = .*@f1.l0' %t
5*f4a2713aSLionel Sambuc 
6*f4a2713aSLionel Sambuc 
7*f4a2713aSLionel Sambuc int g0 __attribute__((used));
8*f4a2713aSLionel Sambuc 
f0(void)9*f4a2713aSLionel Sambuc static void __attribute__((used)) f0(void) {
10*f4a2713aSLionel Sambuc }
11*f4a2713aSLionel Sambuc 
f1()12*f4a2713aSLionel Sambuc void f1() {
13*f4a2713aSLionel Sambuc   static int l0 __attribute__((used)) = 5225;
14*f4a2713aSLionel Sambuc }
15