summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGen/attr-coldhot.c
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/CodeGen/attr-coldhot.c')
-rw-r--r--clang/test/CodeGen/attr-coldhot.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/clang/test/CodeGen/attr-coldhot.c b/clang/test/CodeGen/attr-coldhot.c
new file mode 100644
index 00000000000..b9bb299b5e4
--- /dev/null
+++ b/clang/test/CodeGen/attr-coldhot.c
@@ -0,0 +1,9 @@
+// RUN: %clang_cc1 -emit-llvm %s -o - | FileCheck %s
+
+int test1() __attribute__((__cold__)) {
+ return 42;
+
+// Check that we set the optsize attribute on the function.
+// CHECK: @test1{{.*}}optsize
+// CHECK: ret
+}
OpenPOWER on IntegriCloud