Daniel Dunbar | e528028 | 2009-06-03 16:16:27 +0000 | [diff] [blame] | 1 | // RUN: clang -emit-llvm -S -o %t %s && |
Chris Lattner | 5db7ae5 | 2009-06-13 00:26:38 +0000 | [diff] [blame] | 2 | // RUN: not grep '@f0' %t && |
| 3 | // RUN: not grep 'call ' %t && |
Daniel Dunbar | e528028 | 2009-06-03 16:16:27 +0000 | [diff] [blame] | 4 | // RUN: clang -mllvm -disable-llvm-optzns -emit-llvm -S -o %t %s && |
Daniel Dunbar | 877db38 | 2009-06-02 22:07:45 +0000 | [diff] [blame] | 5 | // RUN: grep '@f0' %t | count 2 |
| 6 | |
| 7 | //static int f0() { |
| 8 | static int __attribute__((always_inline)) f0() { |
| 9 | return 1; |
| 10 | } |
| 11 | |
| 12 | int f1() { |
| 13 | return f0(); |
| 14 | } |
Chris Lattner | 5db7ae5 | 2009-06-13 00:26:38 +0000 | [diff] [blame] | 15 | |
| 16 | // PR4372 |
| 17 | inline int f2() __attribute__((always_inline)); |
| 18 | int f2() { return 7; } |
| 19 | int f3(void) { return f2(); } |
| 20 | |