brintos

brintos / llvm-project-archived public Read only

0
0
Text · 482 B · aa8c1dd Raw
14 lines · c
1// RUN: %clang_cc1 -emit-llvm %s -o - | FileCheck %s -check-prefixes=CHECK,O02// RUN: %clang_cc1 -emit-llvm %s -o - -O1 -disable-llvm-passes | FileCheck %s -check-prefixes=CHECK,O13 4int test1(void) __attribute__((__cold__)) {5  return 42;6 7// Check that we set the optsize attribute on the function.8// CHECK: @test1{{.*}}[[ATTR:#[0-9]+]]9// CHECK: ret10}11 12// O0: attributes [[ATTR]] = { {{.*}}cold{{.*}}optnone{{.*}} }13// O1: attributes [[ATTR]] = { {{.*}}cold{{.*}}optsize{{.*}} }14