diff options
Diffstat (limited to 'llvm/test/Bitcode/attributes.ll')
-rw-r--r-- | llvm/test/Bitcode/attributes.ll | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/llvm/test/Bitcode/attributes.ll b/llvm/test/Bitcode/attributes.ll index 74b0386c33d..dec3608fb2b 100644 --- a/llvm/test/Bitcode/attributes.ll +++ b/llvm/test/Bitcode/attributes.ll @@ -293,6 +293,31 @@ define void @f50(i8* swiftself) ret void; } +; CHECK: define i32 @f51(i8** swifterror) +define i32 @f51(i8** swifterror) +{ + ret i32 0 +} + +; CHECK: define i32 @f52(i32, i8** swifterror) +define i32 @f52(i32, i8** swifterror) +{ + ret i32 0 +} + +%swift_error = type {i64, i8} +declare float @foo(%swift_error** swifterror %error_ptr_ref) + +; CHECK: define float @f53 +; CHECK: alloca swifterror +define float @f53(i8* %error_ref) { +entry: + %error_ptr_ref = alloca swifterror %swift_error* + store %swift_error* null, %swift_error** %error_ptr_ref + %call = call float @foo(%swift_error** swifterror %error_ptr_ref) + ret float 1.0 +} + ; CHECK: attributes #0 = { noreturn } ; CHECK: attributes #1 = { nounwind } ; CHECK: attributes #2 = { readnone } |