From: Aaron Ballman Date: Wed, 4 Dec 2013 21:43:30 +0000 (+0000) Subject: This attribute somehow remained nameless in the attribute tablegen, until now. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=24942d0d6044fd1c07c4d7c50c327cd045cf270b;p=clang This attribute somehow remained nameless in the attribute tablegen, until now. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@196415 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/Basic/Attr.td b/include/clang/Basic/Attr.td index bf5e5d6726..ff4050d462 100644 --- a/include/clang/Basic/Attr.td +++ b/include/clang/Basic/Attr.td @@ -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. diff --git a/lib/Sema/TargetAttributesSema.cpp b/lib/Sema/TargetAttributesSema.cpp index 45067dee9b..375e39cae0 100644 --- a/lib/Sema/TargetAttributesSema.cpp +++ b/lib/Sema/TargetAttributesSema.cpp @@ -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; }