blob: a27711970842aea6fcaae2237e89f5d8fe143c59 [file] [log] [blame]
Benjamin Krameree409a92012-05-12 21:10:52 +00001// RUN: %clang_cc1 -emit-llvm %s -o - | FileCheck %s
2
3int test1() __attribute__((__cold__)) {
4 return 42;
5
6// Check that we set the optsize attribute on the function.
Bill Wendling3bba3ef2013-02-20 19:30:01 +00007// CHECK: @test1{{.*}}[[ATTR:#[0-9]+]]
Benjamin Krameree409a92012-05-12 21:10:52 +00008// CHECK: ret
9}
Bill Wendlingf7a9da02013-02-20 07:22:19 +000010
Bill Wendling3bba3ef2013-02-20 19:30:01 +000011// CHECK: attributes [[ATTR]] = { {{.*}}optsize{{.*}} }