2011-08-23 07:55:33 +08:00
|
|
|
// RUN: %clang_cc1 -triple x86_64-apple-macosx10.7.0 %s -emit-llvm -o - | FileCheck %s
|
2010-09-30 02:20:25 +08:00
|
|
|
|
|
|
|
void t1() __attribute__((naked));
|
|
|
|
|
2011-08-23 07:55:33 +08:00
|
|
|
// Basic functionality check
|
|
|
|
// (Note that naked needs to imply noinline to work properly.)
|
2013-02-01 07:17:12 +08:00
|
|
|
// CHECK: define void @t1() naked noinline nounwind {
|
2010-09-30 02:20:25 +08:00
|
|
|
void t1()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2011-08-23 07:55:33 +08:00
|
|
|
// Make sure this doesn't explode in the verifier.
|
|
|
|
// (It doesn't really make sense, but it isn't invalid.)
|
2013-02-01 07:17:12 +08:00
|
|
|
// CHECK: define void @t2() naked noinline nounwind {
|
2011-08-23 07:55:33 +08:00
|
|
|
__attribute((naked, always_inline)) void t2() {
|
|
|
|
}
|