blob: a629c9341a9f0fefae81a544ac5a26eed7b20f2c [file] [log] [blame]
Devang Patel221fe422008-09-29 20:49:50 +00001; Test function attributes
Bill Wendling84ba9762013-02-11 08:34:57 +00002; RUN: llvm-as < %s | llvm-dis | FileCheck %s
Duncan P. N. Exon Smithc8eccd12014-08-19 21:08:27 +00003; RUN: verify-uselistorder %s
Devang Patelcc4d6ce2008-09-02 20:58:16 +00004
Bill Wendling90bc19c2013-02-20 07:21:42 +00005; CHECK: define void @fn1() #0
Devang Pateldb937ec2008-09-27 00:25:28 +00006define void @fn1() alwaysinline {
Devang Patelcc4d6ce2008-09-02 20:58:16 +00007 ret void
8}
9
Bill Wendling90bc19c2013-02-20 07:21:42 +000010; CHECK: define void @fn2() #1
Devang Pateldb937ec2008-09-27 00:25:28 +000011define void @fn2() noinline {
Devang Patelcc4d6ce2008-09-02 20:58:16 +000012 ret void
13}
14
Bill Wendling84ba9762013-02-11 08:34:57 +000015; CHECK: define void @fn3()
Bill Wendling90bc19c2013-02-20 07:21:42 +000016; CHECK-NOT: define void @fn3() #{{.*}}
Devang Patelca9d93e2008-09-02 21:47:13 +000017define void @fn3() {
18 ret void
19}
Bill Wendling90bc19c2013-02-20 07:21:42 +000020
21; CHECK: attributes #0 = { alwaysinline }
22; CHECK: attributes #1 = { noinline }