]> granicus.if.org Git - clang/commitdiff
Revert commit r166946
authorQuentin Colombet <qcolombet@apple.com>
Mon, 29 Oct 2012 18:28:57 +0000 (18:28 +0000)
committerQuentin Colombet <qcolombet@apple.com>
Mon, 29 Oct 2012 18:28:57 +0000 (18:28 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166957 91177308-0d34-0410-b5e6-96231b3b80d8

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

index 4a5f1e727f008c632d98a4c3cbee626f76fd3485..738b460b5a45ae3b31ca00cf678213d7544ee3e0 100644 (file)
@@ -341,11 +341,6 @@ def Final : InheritableAttr {
   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">,
index 523e2d2624725d406603503bc0e14faf5ae52e60..9617de8eb7a1fde065b2a43b15adef265b2d90e8 100644 (file)
@@ -583,9 +583,6 @@ void CodeGenModule::SetLLVMFunctionAttributesForDefinition(const Decl *D,
   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);
 
index 992cafce747456ec2cc913908ef3183ed5bf521d..df4757e4d27b7e38d06561793209f11b220f413c 100644 (file)
@@ -1523,20 +1523,6 @@ static void handleAliasAttr(Sema &S, Decl *D, const AttributeList &Attr) {
                                          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 @@ static void ProcessInheritableDeclAttr(Sema &S, Scope *scope, Decl *D,
   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;
index 693e7ccbadebd810155ea473d2e53a23b74ec3da..c4e6c4ad817c2e2baaeb33b15593060122957f98 100644 (file)
@@ -24,8 +24,3 @@ int test2() {
 // OTHER-NOT: forcesizeopt
 // OTHER: ret
 }
-
-int test3() __attribute__((forcesizeopt)) {
-// Oz: @test3{{.*}}forcesizeopt
-// OTHER: @test3{{.*}}forcesizeopt
-}