remove the "old" at&t style asmprinter. Unfortunately, most of the
[llvm/avr.git] / test / FrontendC / 2007-04-11-InlineStorageClassC99.c
blob3607999eb17d4e71f07b86ebecb76c7554c59d10
1 // RUN: %llvmgcc -std=c99 %s -S -emit-llvm -O0 -o - | grep define | \
2 // RUN: grep xglobWeak | grep weak | count 1
3 // RUN: %llvmgcc -std=c99 %s -S -emit-llvm -O0 -o - | grep define | \
4 // RUN: grep xextWeak | grep weak | count 1
5 // RUN: %llvmgcc -std=c99 %s -S -emit-llvm -O0 -o - | grep define | \
6 // RUN: grep xWeaknoinline | grep weak | count 1
7 // RUN: %llvmgcc -std=c99 %s -S -emit-llvm -O0 -o - | grep define | \
8 // RUN: grep xWeakextnoinline | grep weak | count 1
9 // RUN: %llvmgcc -std=c99 %s -S -emit-llvm -O0 -o - | grep define | \
10 // RUN: grep xglobnoWeak | grep available_externally | count 1
11 // RUN: %llvmgcc -std=c99 %s -S -emit-llvm -O0 -o - | grep define | \
12 // RUN: grep xstatnoWeak | grep internal | count 1
13 // RUN: %llvmgcc -std=c99 %s -S -emit-llvm -O0 -o - | grep define | \
14 // RUN: grep xextnoWeak | grep -v internal | grep -v weak | \
15 // RUN: grep -v linkonce | count 1
16 inline int xglobWeak(int) __attribute__((weak));
17 inline int xglobWeak (int i) {
18 return i*2;
20 inline int xextWeak(int) __attribute__((weak));
21 extern inline int xextWeak (int i) {
22 return i*4;
24 int xWeaknoinline(int) __attribute__((weak));
25 int xWeaknoinline(int i) {
26 return i*8;
28 int xWeakextnoinline(int) __attribute__((weak));
29 extern int xWeakextnoinline(int i) {
30 return i*16;
32 inline int xglobnoWeak (int i) {
33 return i*32;
35 static inline int xstatnoWeak (int i) {
36 return i*64;
38 extern inline int xextnoWeak (int i) {
39 return i*128;
41 int j(int y) {
42 return xglobnoWeak(y)+xstatnoWeak(y)+xextnoWeak(y)+
43 xglobWeak(y)+xextWeak(y)+
44 xWeakextnoinline(y)+xWeaknoinline(y);