diff options
Diffstat (limited to 'test/CodeGen/attr-naked.c')
-rw-r--r-- | test/CodeGen/attr-naked.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/test/CodeGen/attr-naked.c b/test/CodeGen/attr-naked.c index c07dd8d..270fc79 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{{.*}} } |