aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGen/attr-naked.c
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2015-01-18 16:23:48 +0000
committerDimitry Andric <dim@FreeBSD.org>2015-01-18 16:23:48 +0000
commit06d4ba388873e6d1cfa9cd715a8935ecc8cd2097 (patch)
tree3eb853da77d46cc77c4b017525a422f9ddb1385b /test/CodeGen/attr-naked.c
parent30d791273d07fac9c0c1641a0731191bca6e8606 (diff)
Vendor import of clang RELEASE_360/rc1 tag r226102 (effectively, 3.6.0 RC1):vendor/clang/clang-release_360-r226102
Diffstat (limited to 'test/CodeGen/attr-naked.c')
-rw-r--r--test/CodeGen/attr-naked.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/test/CodeGen/attr-naked.c b/test/CodeGen/attr-naked.c
index c07dd8d3732a..270fc7959f44 100644
--- a/test/CodeGen/attr-naked.c
+++ b/test/CodeGen/attr-naked.c
@@ -12,7 +12,15 @@ void t1()
// Make sure this doesn't explode in the verifier.
// (It doesn't really make sense, but it isn't invalid.)
// CHECK: define void @t2() [[NAKED]] {
-__attribute((naked, always_inline)) void t2() {
+__attribute((naked, always_inline)) void t2() {
+}
+
+// Make sure not to generate prolog or epilog for naked functions.
+__attribute((naked)) void t3(int x) {
+// CHECK: define void @t3(i32)
+// CHECK-NOT: alloca
+// CHECK-NOT: store
+// CHECK: unreachable
}
// CHECK: attributes [[NAKED]] = { naked noinline nounwind{{.*}} }