summaryrefslogtreecommitdiff
path: root/test/CodeGen/attributes.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGen/attributes.c')
-rw-r--r--test/CodeGen/attributes.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/CodeGen/attributes.c b/test/CodeGen/attributes.c
index 9e5fa9f906511..34833a2469200 100644
--- a/test/CodeGen/attributes.c
+++ b/test/CodeGen/attributes.c
@@ -56,6 +56,13 @@ void t4() {}
void t7() __attribute__((noreturn, nothrow));
void t7() { while (1) {} }
+// CHECK: define void @t72() [[COLDDEF:#[0-9]+]] {
+void t71(void) __attribute__((cold));
+void t72() __attribute__((cold));
+void t72() { t71(); }
+// CHECK: call void @t71() [[COLDSITE:#[0-9]+]]
+// CHECK: declare void @t71() [[COLDDECL:#[0-9]+]]
+
// CHECK: define void @t10() [[NUW]] section "SECT" {
void t10(void) __attribute__((section("SECT")));
void t10(void) {}
@@ -92,3 +99,6 @@ void __attribute__((section(".bar"))) t22(void) {}
// CHECK: attributes [[NUW]] = { noinline nounwind{{.*}} }
// CHECK: attributes [[NR]] = { noinline noreturn nounwind{{.*}} }
+// CHECK: attributes [[COLDDEF]] = { cold {{.*}}}
+// CHECK: attributes [[COLDDECL]] = { cold {{.*}}}
+// CHECK: attributes [[COLDSITE]] = { cold {{.*}}}