Benjamin Kramer | ee409a9 | 2012-05-12 21:10:52 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -emit-llvm %s -o - | FileCheck %s |
| 2 | |
| 3 | int test1() __attribute__((__cold__)) { |
| 4 | return 42; |
| 5 | |
| 6 | // Check that we set the optsize attribute on the function. |
Bill Wendling | 3bba3ef | 2013-02-20 19:30:01 +0000 | [diff] [blame] | 7 | // CHECK: @test1{{.*}}[[ATTR:#[0-9]+]] |
Benjamin Kramer | ee409a9 | 2012-05-12 21:10:52 +0000 | [diff] [blame] | 8 | // CHECK: ret |
| 9 | } |
Bill Wendling | f7a9da0 | 2013-02-20 07:22:19 +0000 | [diff] [blame] | 10 | |
Bill Wendling | 3bba3ef | 2013-02-20 19:30:01 +0000 | [diff] [blame] | 11 | // CHECK: attributes [[ATTR]] = { {{.*}}optsize{{.*}} } |