pass machinemoduleinfo down into getSymbolForDwarfGlobalReference,
[llvm/avr.git] / test / FrontendC++ / 2007-04-11-InlineStorageClassC++.cpp
blobeabcd57327084c473016d470e1be337d9f91d465
1 // RUN: %llvmgxx %s -S -emit-llvm -O0 -o - | grep define | \
2 // RUN: grep xglobWeak | grep linkonce | count 1
3 // RUN: %llvmgxx %s -S -emit-llvm -O0 -o - | grep define | \
4 // RUN: grep xextWeak | grep linkonce | count 1
5 // RUN: %llvmgxx %s -S -emit-llvm -O0 -o - | grep define | \
6 // RUN: grep xWeaknoinline | grep weak | count 1
7 // RUN: %llvmgxx %s -S -emit-llvm -O0 -o - | grep define | \
8 // RUN: grep xWeakextnoinline | grep weak | count 1
9 // RUN: %llvmgxx %s -S -emit-llvm -O0 -o - | grep define | \
10 // RUN: grep xglobnoWeak | grep linkonce | count 1
11 // RUN: %llvmgxx %s -S -emit-llvm -O0 -o - | grep define | \
12 // RUN: grep xstatnoWeak | grep internal | count 1
13 // RUN: %llvmgxx %s -S -emit-llvm -O0 -o - | grep define | \
14 // RUN: grep xextnoWeak | grep linkonce | count 1
15 inline int xglobWeak(int) __attribute__((weak));
16 inline int xglobWeak (int i) {
17 return i*2;
19 inline int xextWeak(int) __attribute__((weak));
20 extern inline int xextWeak (int i) {
21 return i*4;
23 int xWeaknoinline(int) __attribute__((weak));
24 int xWeaknoinline(int i) {
25 return i*8;
27 int xWeakextnoinline(int) __attribute__((weak));
28 extern int xWeakextnoinline(int i) {
29 return i*16;
31 inline int xglobnoWeak (int i) {
32 return i*32;
34 static inline int xstatnoWeak (int i) {
35 return i*64;
37 extern inline int xextnoWeak (int i) {
38 return i*128;
40 int j(int y) {
41 return xglobnoWeak(y)+xstatnoWeak(y)+xextnoWeak(y)+
42 xglobWeak(y)+xextWeak(y)+
43 xWeakextnoinline(y)+xWeaknoinline(y);