diff options
Diffstat (limited to 'test/CodeGen/always_inline.c')
-rw-r--r-- | test/CodeGen/always_inline.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/CodeGen/always_inline.c b/test/CodeGen/always_inline.c new file mode 100644 index 0000000..d159bd22 --- /dev/null +++ b/test/CodeGen/always_inline.c @@ -0,0 +1,13 @@ +// RUN: clang-cc -emit-llvm -o %t %s && +// RUN: grep '@f0' %t | count 0 && +// RUN: clang-cc -disable-llvm-optzns -emit-llvm -o %t %s && +// RUN: grep '@f0' %t | count 2 + +//static int f0() { +static int __attribute__((always_inline)) f0() { + return 1; +} + +int f1() { + return f0(); +} |