[cfe-commits] r166957 - in /cfe/trunk: include/clang/Basic/Attr.td lib/CodeGen/CodeGenModule.cpp lib/Sema/SemaDeclAttr.cpp test/CodeGen/attr-forcesizeopt.c

Quentin Colombet qcolombet at apple.com
Mon Oct 29 11:28:58 PDT 2012


Author: qcolombet
Date: Mon Oct 29 13:28:57 2012
New Revision: 166957

URL: http://llvm.org/viewvc/llvm-project?rev=166957&view=rev
Log:
Revert commit r166946

Modified:
    cfe/trunk/include/clang/Basic/Attr.td
    cfe/trunk/lib/CodeGen/CodeGenModule.cpp
    cfe/trunk/lib/Sema/SemaDeclAttr.cpp
    cfe/trunk/test/CodeGen/attr-forcesizeopt.c

Modified: cfe/trunk/include/clang/Basic/Attr.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/Attr.td?rev=166957&r1=166956&r2=166957&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/Attr.td (original)
+++ cfe/trunk/include/clang/Basic/Attr.td Mon Oct 29 13:28:57 2012
@@ -341,11 +341,6 @@
   let SemaHandler = 0;
 }
 
-def ForceSizeOpt : InheritableAttr {
-  let Spellings = [GNU<"forcesizeopt">];
-  let Subjects = [Function];
-}
-
 def Format : InheritableAttr {
   let Spellings = [GNU<"format">];
   let Args = [StringArgument<"Type">, IntArgument<"FormatIdx">,

Modified: cfe/trunk/lib/CodeGen/CodeGenModule.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenModule.cpp?rev=166957&r1=166956&r2=166957&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CodeGenModule.cpp (original)
+++ cfe/trunk/lib/CodeGen/CodeGenModule.cpp Mon Oct 29 13:28:57 2012
@@ -583,9 +583,6 @@
   if (D->hasAttr<ColdAttr>())
     F->addFnAttr(llvm::Attributes::OptimizeForSize);
 
-  if (D->hasAttr<ForceSizeOptAttr>())
-    F->addFnAttr(llvm::Attributes::ForceSizeOpt);
-
   if (isa<CXXConstructorDecl>(D) || isa<CXXDestructorDecl>(D))
     F->setUnnamedAddr(true);
 

Modified: cfe/trunk/lib/Sema/SemaDeclAttr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDeclAttr.cpp?rev=166957&r1=166956&r2=166957&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaDeclAttr.cpp (original)
+++ cfe/trunk/lib/Sema/SemaDeclAttr.cpp Mon Oct 29 13:28:57 2012
@@ -1523,20 +1523,6 @@
                                          Str->getString()));
 }
 
-static void handleForceSizeOptAttr(Sema &S, Decl *D, const AttributeList &Attr) {
-  // Check the attribute arguments.
-  if (!checkAttributeNumArgs(S, Attr, 0))
-    return;
-
-  if (!isa<FunctionDecl>(D)) {
-    S.Diag(Attr.getLoc(), diag::warn_attribute_wrong_decl_type)
-      << Attr.getName() << ExpectedFunction;
-    return;
-  }
-
-  D->addAttr(::new (S.Context) ForceSizeOptAttr(Attr.getRange(), S.Context));
-}
-
 static void handleColdAttr(Sema &S, Decl *D, const AttributeList &Attr) {
   // Check the attribute arguments.
   if (!checkAttributeNumArgs(S, Attr, 0))
@@ -4299,9 +4285,6 @@
   case AttributeList::AT_ExtVectorType:
     handleExtVectorTypeAttr(S, scope, D, Attr);
     break;
-  case AttributeList::AT_ForceSizeOpt:
-    handleForceSizeOptAttr(S, D, Attr);
-    break;
   case AttributeList::AT_Format:      handleFormatAttr      (S, D, Attr); break;
   case AttributeList::AT_FormatArg:   handleFormatArgAttr   (S, D, Attr); break;
   case AttributeList::AT_CUDAGlobal:  handleGlobalAttr      (S, D, Attr); break;

Modified: cfe/trunk/test/CodeGen/attr-forcesizeopt.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/attr-forcesizeopt.c?rev=166957&r1=166956&r2=166957&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/attr-forcesizeopt.c (original)
+++ cfe/trunk/test/CodeGen/attr-forcesizeopt.c Mon Oct 29 13:28:57 2012
@@ -24,8 +24,3 @@
 // OTHER-NOT: forcesizeopt
 // OTHER: ret
 }
-
-int test3() __attribute__((forcesizeopt)) {
-// Oz: @test3{{.*}}forcesizeopt
-// OTHER: @test3{{.*}}forcesizeopt
-}





More information about the cfe-commits mailing list