1; RUN: llvm-dis < %s.bc| FileCheck %s 2; RUN: verify-uselistorder < %s.bc 3 4; attributes-3.3.ll.bc was generated by passing this file to llvm-as-3.3. 5; The test checks that LLVM does not silently misread attributes of 6; older bitcode files. 7 8define void @f1(i8 zeroext) 9; CHECK: define void @f1(i8 zeroext) 10{ 11 ret void; 12} 13 14define void @f2(i8 signext) 15; CHECK: define void @f2(i8 signext) 16{ 17 ret void; 18} 19 20define void @f3() noreturn 21; CHECK: define void @f3() #0 22{ 23 ret void; 24} 25 26define void @f4(i8 inreg) 27; CHECK: define void @f4(i8 inreg) 28{ 29 ret void; 30} 31 32define void @f5(i8* sret) 33; CHECK: define void @f5(i8* sret) 34{ 35 ret void; 36} 37 38define void @f6() nounwind 39; CHECK: define void @f6() #1 40{ 41 ret void; 42} 43 44define void @f7(i8* noalias) 45; CHECK: define void @f7(i8* noalias) 46{ 47 ret void; 48} 49 50define void @f8(i8* byval) 51; CHECK: define void @f8(i8* byval) 52{ 53 ret void; 54} 55 56define void @f9(i8* nest) 57; CHECK: define void @f9(i8* nest) 58{ 59 ret void; 60} 61 62define void @f10() readnone 63; CHECK: define void @f10() #2 64{ 65 ret void; 66} 67 68define void @f11() readonly 69; CHECK: define void @f11() #3 70{ 71 ret void; 72} 73 74define void @f12() noinline 75; CHECK: define void @f12() #4 76{ 77 ret void; 78} 79 80define void @f13() alwaysinline 81; CHECK: define void @f13() #5 82{ 83 ret void; 84} 85 86define void @f14() optsize 87; CHECK: define void @f14() #6 88{ 89 ret void; 90} 91 92define void @f15() ssp 93; CHECK: define void @f15() #7 94{ 95 ret void; 96} 97 98define void @f16() sspreq 99; CHECK: define void @f16() #8 100{ 101 ret void; 102} 103 104define void @f17(i8 align 4) 105; CHECK: define void @f17(i8 align 4) 106{ 107 ret void; 108} 109 110define void @f18(i8* nocapture) 111; CHECK: define void @f18(i8* nocapture) 112{ 113 ret void; 114} 115 116define void @f19() noredzone 117; CHECK: define void @f19() #9 118{ 119 ret void; 120} 121 122define void @f20() noimplicitfloat 123; CHECK: define void @f20() #10 124{ 125 ret void; 126} 127 128define void @f21() naked 129; CHECK: define void @f21() #11 130{ 131 ret void; 132} 133 134define void @f22() inlinehint 135; CHECK: define void @f22() #12 136{ 137 ret void; 138} 139 140define void @f23() alignstack(4) 141; CHECK: define void @f23() #13 142{ 143 ret void; 144} 145 146define void @f24() returns_twice 147; CHECK: define void @f24() #14 148{ 149 ret void; 150} 151 152define void @f25() uwtable 153; CHECK: define void @f25() #15 154{ 155 ret void; 156} 157 158define void @f26() nonlazybind 159; CHECK: define void @f26() #16 160{ 161 ret void; 162} 163 164define void @f27() sanitize_address 165; CHECK: define void @f27() #17 166{ 167 ret void; 168} 169define void @f28() sanitize_thread 170; CHECK: define void @f28() #18 171{ 172 ret void; 173} 174define void @f29() sanitize_memory 175; CHECK: define void @f29() #19 176{ 177 ret void; 178} 179 180define void @f30() "cpu"="cortex-a8" 181; CHECK: define void @f30() #20 182{ 183 ret void; 184} 185 186define i8 @f31(i8 returned %A) 187; CHECK: define i8 @f31(i8 returned %A) 188{ 189 ret i8 %A; 190} 191 192define void @f32() sspstrong 193; CHECK: define void @f32() #21 194{ 195 ret void; 196} 197 198define void @f33() minsize 199; CHECK: define void @f33() #22 200{ 201 ret void; 202} 203 204declare void @nobuiltin() 205 206define void @f34() 207; CHECK: define void @f34() 208{ 209 call void @nobuiltin() nobuiltin 210; CHECK: call void @nobuiltin() #23 211 ret void; 212} 213 214; CHECK: attributes #0 = { noreturn } 215; CHECK: attributes #1 = { nounwind } 216; CHECK: attributes #2 = { readnone } 217; CHECK: attributes #3 = { readonly } 218; CHECK: attributes #4 = { noinline } 219; CHECK: attributes #5 = { alwaysinline } 220; CHECK: attributes #6 = { optsize } 221; CHECK: attributes #7 = { ssp } 222; CHECK: attributes #8 = { sspreq } 223; CHECK: attributes #9 = { noredzone } 224; CHECK: attributes #10 = { noimplicitfloat } 225; CHECK: attributes #11 = { naked } 226; CHECK: attributes #12 = { inlinehint } 227; CHECK: attributes #13 = { alignstack=4 } 228; CHECK: attributes #14 = { returns_twice } 229; CHECK: attributes #15 = { uwtable } 230; CHECK: attributes #16 = { nonlazybind } 231; CHECK: attributes #17 = { sanitize_address } 232; CHECK: attributes #18 = { sanitize_thread } 233; CHECK: attributes #19 = { sanitize_memory } 234; CHECK: attributes #20 = { "cpu"="cortex-a8" } 235; CHECK: attributes #21 = { sspstrong } 236; CHECK: attributes #22 = { minsize } 237; CHECK: attributes #23 = { nobuiltin } 238