1 // RUN: %llvmgcc -c -emit-llvm %s -o - | llvm-dis | grep llvm.global.annotations
2 // RUN: %llvmgcc -c -emit-llvm %s -o - | llvm-dis | grep llvm.var.annotation | count 3
6 /* Global variable with attribute */
7 int X
__attribute__((annotate("GlobalValAnnotation")));
9 /* Function with attribute */
10 int foo(int y
) __attribute__((annotate("GlobalValAnnotation")))
11 __attribute__((noinline
));
13 int foo(int y
__attribute__((annotate("LocalValAnnotation")))) {
14 int x
__attribute__((annotate("LocalValAnnotation")));
20 static int a
__attribute__((annotate("GlobalValAnnotation")));
22 printf("hello world%d\n", a
);