summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGen/function-attributes.c
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/CodeGen/function-attributes.c')
-rw-r--r--clang/test/CodeGen/function-attributes.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/clang/test/CodeGen/function-attributes.c b/clang/test/CodeGen/function-attributes.c
index 2139f6fe654..49f47bf74d4 100644
--- a/clang/test/CodeGen/function-attributes.c
+++ b/clang/test/CodeGen/function-attributes.c
@@ -108,6 +108,20 @@ void f20(void) {
_setjmp(0);
}
+// Bogus declarations that will end up with bad types when detecting builtins,
+// but that we will still process when considering whether to add attributes.
+struct __jmp_buf_tag;
+extern int __sigsetjmp(struct __jmp_buf_tag *__env, int __savemask);
+
+// CHECK-LABEL: define void @f21()
+// CHECK: {
+// CHECK: call i32 @__sigsetjmp(%{{.*}}* null, i32 0)
+// CHECK: [[RT_CALL]]
+// CHECK: ret void
+void f21(void) {
+ __sigsetjmp(0, 0);
+}
+
// CHECK: attributes [[NUW]] = { nounwind optsize{{.*}} }
// CHECK: attributes [[AI]] = { alwaysinline nounwind optsize{{.*}} }
// CHECK: attributes [[NUW_OS_RN]] = { nounwind optsize readnone{{.*}} }
OpenPOWER on IntegriCloud