]> granicus.if.org Git - clang/commitdiff
This attribute somehow remained nameless in the attribute tablegen, until now.
authorAaron Ballman <aaron@aaronballman.com>
Wed, 4 Dec 2013 21:43:30 +0000 (21:43 +0000)
committerAaron Ballman <aaron@aaronballman.com>
Wed, 4 Dec 2013 21:43:30 +0000 (21:43 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@196415 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Basic/Attr.td
lib/Sema/TargetAttributesSema.cpp

index bf5e5d672609d11ca472eff65bf21f10d41bc224..ff4050d462ebae3f66d2e7080c745a62484fd62a 100644 (file)
@@ -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.
index 45067dee9b8dad117432aa961897f3350cd54c79..375e39cae07b368b1f11feac70d8319a231289a8 100644 (file)
@@ -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;
       }