summaryrefslogtreecommitdiff
path: root/test/CodeGen
diff options
context:
space:
mode:
authorEd Schouten <ed@FreeBSD.org>2009-06-03 13:29:08 +0000
committerEd Schouten <ed@FreeBSD.org>2009-06-03 13:29:08 +0000
commit922a2097733e49b869978a264837ad60eca82891 (patch)
tree4075b1f9165f6c8d2b9a7e98b89a1348669f78fe /test/CodeGen
parentec2b103c267a06a66e926f62cd96767b280f5cf5 (diff)
Notes
Diffstat (limited to 'test/CodeGen')
-rw-r--r--test/CodeGen/always_inline.c13
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 000000000000..d159bd2233e4
--- /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();
+}