diff options
author | Aaron Ballman <aaron@aaronballman.com> | 2013-12-04 21:43:30 +0000 |
---|---|---|
committer | Aaron Ballman <aaron@aaronballman.com> | 2013-12-04 21:43:30 +0000 |
commit | 3001339783e6c11a91a25f51cccbab359709526d (patch) | |
tree | 4b434679d8635140af00c08108c4c96774343fd8 /clang | |
parent | 3c842626ab90cda72ca0879d2fa165a26c06e3cf (diff) | |
download | bcm5719-llvm-3001339783e6c11a91a25f51cccbab359709526d.tar.gz bcm5719-llvm-3001339783e6c11a91a25f51cccbab359709526d.zip |
This attribute somehow remained nameless in the attribute tablegen, until now.
llvm-svn: 196415
Diffstat (limited to 'clang')
-rw-r--r-- | clang/include/clang/Basic/Attr.td | 5 | ||||
-rw-r--r-- | clang/lib/Sema/TargetAttributesSema.cpp | 3 |
2 files changed, 5 insertions, 3 deletions
diff --git a/clang/include/clang/Basic/Attr.td b/clang/include/clang/Basic/Attr.td index bf5e5d67260..ff4050d462e 100644 --- a/clang/include/clang/Basic/Attr.td +++ b/clang/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/clang/lib/Sema/TargetAttributesSema.cpp b/clang/lib/Sema/TargetAttributesSema.cpp index 45067dee9b8..375e39cae07 100644 --- a/clang/lib/Sema/TargetAttributesSema.cpp +++ b/clang/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; } |