if (CodeGenOpts.OptimizeSize)
FuncAttrs.addAttribute(llvm::Attributes::OptimizeForSize);
if (CodeGenOpts.OptimizeSize == 2)
- FuncAttrs.addAttribute(llvm::Attributes::ForceSizeOpt);
+ FuncAttrs.addAttribute(llvm::Attributes::MinSize);
if (CodeGenOpts.DisableRedZone)
FuncAttrs.addAttribute(llvm::Attributes::NoRedZone);
if (CodeGenOpts.NoImplicitFloat)
// RUN: %clang_cc1 -O2 -emit-llvm %s -o - | FileCheck %s -check-prefix=OTHER
// RUN: %clang_cc1 -O3 -emit-llvm %s -o - | FileCheck %s -check-prefix=OTHER
// RUN: %clang_cc1 -Os -emit-llvm %s -o - | FileCheck %s -check-prefix=OTHER
-// Check that we set the forcesizeopt attribute on each function
+// Check that we set the minsize attribute on each function
// when Oz optimization level is set.
int test1() {
return 42;
-// Oz: @test1{{.*}}forcesizeopt
+// Oz: @test1{{.*}}minsize
// Oz: ret
// OTHER: @test1
-// OTHER-NOT: forcesizeopt
+// OTHER-NOT: minsize
// OTHER: ret
}
int test2() {
return 42;
-// Oz: @test2{{.*}}forcesizeopt
+// Oz: @test2{{.*}}minsize
// Oz: ret
// OTHER: @test2
-// OTHER-NOT: forcesizeopt
+// OTHER-NOT: minsize
// OTHER: ret
}