aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGen/noinline.c
diff options
context:
space:
mode:
authorChad Rosier <mcrosier@apple.com>2012-03-06 18:49:20 +0000
committerChad Rosier <mcrosier@apple.com>2012-03-06 18:49:20 +0000
commit250008b4678b19ef80866702e300bb4e53d9ff2d (patch)
treef632bc87d78f1d3b89f90cb8851d4f44154af953 /test/CodeGen/noinline.c
parent27949f65b089fec7902b2a15d718b3d1b0ccf988 (diff)
[driver] Add support for -fno-inline.
rdar://10972766 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152130 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/noinline.c')
-rw-r--r--test/CodeGen/noinline.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/CodeGen/noinline.c b/test/CodeGen/noinline.c
new file mode 100644
index 0000000000..18d34e1600
--- /dev/null
+++ b/test/CodeGen/noinline.c
@@ -0,0 +1,14 @@
+// Make sure -fno-inline is behaving correctly.
+// rdar://10972766
+
+// RUN: %clang_cc1 -O3 -fno-inline -emit-llvm %s -o - | FileCheck -check-prefix=NOINLINE %s
+
+int dont_inline_me(int a, int b) { return(a+b); }
+
+volatile int *pa = (int*) 0x1000;
+void foo() {
+// NOINLINE: @foo
+// NOINLINE: dont_inline_me
+ pa[0] = dont_inline_me(pa[1],pa[2]);
+}
+