]> granicus.if.org Git - clang/commitdiff
Change ForceSizeOpt attribute into MinSize attribute
authorQuentin Colombet <qcolombet@apple.com>
Tue, 30 Oct 2012 16:33:19 +0000 (16:33 +0000)
committerQuentin Colombet <qcolombet@apple.com>
Tue, 30 Oct 2012 16:33:19 +0000 (16:33 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167021 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGCall.cpp
test/CodeGen/attr-minsize.c [moved from test/CodeGen/attr-forcesizeopt.c with 77% similarity]

index f09332efc6b70e7fee29b02750e3d00970920c6f..0b3e9deb3f50e1e67564da0814929e28b9482468 100644 (file)
@@ -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)
similarity index 77%
rename from test/CodeGen/attr-forcesizeopt.c
rename to test/CodeGen/attr-minsize.c
index c4e6c4ad817c2e2baaeb33b15593060122957f98..dd260e43e0051913729a3c9c6cc6fc44917ffbef 100644 (file)
@@ -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
 }