r196415 - This attribute somehow remained nameless in the attribute tablegen, until now.

Aaron Ballman aaron at aaronballman.com
Wed Dec 4 13:43:30 PST 2013


Author: aaronballman
Date: Wed Dec  4 15:43:30 2013
New Revision: 196415

URL: http://llvm.org/viewvc/llvm-project?rev=196415&view=rev
Log:
This attribute somehow remained nameless in the attribute tablegen, until now.

Modified:
    cfe/trunk/include/clang/Basic/Attr.td
    cfe/trunk/lib/Sema/TargetAttributesSema.cpp

Modified: cfe/trunk/include/clang/Basic/Attr.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/Attr.td?rev=196415&r1=196414&r2=196415&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/Attr.td (original)
+++ cfe/trunk/include/clang/Basic/Attr.td Wed Dec  4 15:43:30 2013
@@ -916,7 +916,10 @@ def WeakRef : InheritableAttr {
 }
 
 def X86ForceAlignArgPointer : InheritableAttr, TargetSpecificAttr {
-  let Spellings = [];
+  let Spellings = [GNU<"force_align_arg_pointer">];
+  // Technically, this appertains to a FunctionDecl, but the target-specific
+  // code silently allows anything function-like (such as typedefs or function
+  // pointers), but does not apply the attribute to them.
 }
 
 // Attribute to disable AddressSanitizer (or equivalent) checks.

Modified: cfe/trunk/lib/Sema/TargetAttributesSema.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/TargetAttributesSema.cpp?rev=196415&r1=196414&r2=196415&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/TargetAttributesSema.cpp (original)
+++ cfe/trunk/lib/Sema/TargetAttributesSema.cpp Wed Dec  4 15:43:30 2013
@@ -267,8 +267,7 @@ namespace {
         }
       }
       if (Triple.getArch() != llvm::Triple::x86_64 &&
-          (Attr.getName()->getName() == "force_align_arg_pointer" ||
-           Attr.getName()->getName() == "__force_align_arg_pointer__")) {
+          Attr.getKind() == AttributeList::AT_X86ForceAlignArgPointer) {
         HandleX86ForceAlignArgPointerAttr(D, Attr, S);
         return true;
       }





More information about the cfe-commits mailing list