diff options
author | Quentin Colombet <qcolombet@apple.com> | 2012-10-30 16:33:19 +0000 |
---|---|---|
committer | Quentin Colombet <qcolombet@apple.com> | 2012-10-30 16:33:19 +0000 |
commit | 356d9cccd7fa455fc609d4c9eac330e380d832d7 (patch) | |
tree | 73cb83b6f9c4c3ef0fa4ef63153cebc7c0051de0 | |
parent | d1ce3c178b9c648687591b190e0d252124fc2459 (diff) |
Change ForceSizeOpt attribute into MinSize attribute
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167021 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/CodeGen/CGCall.cpp | 2 | ||||
-rw-r--r-- | test/CodeGen/attr-minsize.c (renamed from test/CodeGen/attr-forcesizeopt.c) | 10 |
2 files changed, 6 insertions, 6 deletions
diff --git a/lib/CodeGen/CGCall.cpp b/lib/CodeGen/CGCall.cpp index f09332efc6..0b3e9deb3f 100644 --- a/lib/CodeGen/CGCall.cpp +++ b/lib/CodeGen/CGCall.cpp @@ -969,7 +969,7 @@ void CodeGenModule::ConstructAttributeList(const CGFunctionInfo &FI, 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) diff --git a/test/CodeGen/attr-forcesizeopt.c b/test/CodeGen/attr-minsize.c index c4e6c4ad81..dd260e43e0 100644 --- a/test/CodeGen/attr-forcesizeopt.c +++ b/test/CodeGen/attr-minsize.c @@ -4,23 +4,23 @@ // 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 } |