xref: /aosp_15_r20/external/clang/test/CodeGen/attr-coldhot.c (revision 67e74705e28f6214e480b399dd47ea732279e315)
1*67e74705SXin Li // RUN: %clang_cc1 -emit-llvm %s -o - | FileCheck %s
2*67e74705SXin Li 
test1()3*67e74705SXin Li int test1() __attribute__((__cold__)) {
4*67e74705SXin Li   return 42;
5*67e74705SXin Li 
6*67e74705SXin Li // Check that we set the optsize attribute on the function.
7*67e74705SXin Li // CHECK: @test1{{.*}}[[ATTR:#[0-9]+]]
8*67e74705SXin Li // CHECK: ret
9*67e74705SXin Li }
10*67e74705SXin Li 
11*67e74705SXin Li // CHECK: attributes [[ATTR]] = { {{.*}}cold{{.*}}optsize{{.*}} }
12