diff options
author | Erich Keane <erich.keane@intel.com> | 2017-12-20 18:51:08 +0000 |
---|---|---|
committer | Erich Keane <erich.keane@intel.com> | 2017-12-20 18:51:08 +0000 |
commit | 6bb630e324efc92f36c95fc2ac11ba71751cd9b4 (patch) | |
tree | 7c6ca8833a23e5ad445d12e7ca1a20910548a73d /lib/Sema | |
parent | 7d32ec8fb0d04f322b2ad1ddfaec72110d9a3a96 (diff) |
Add support for ObjectFormat to TargetSpecificAttr
Looking through the code, I saw a FIXME on IFunc to switch it
to a target specific attribute. In looking through it, i saw that
the no-longer-appropriately-named TargetArch didn't support ObjectFormat
checking.
This patch changes the name of TargetArch to TargetSpecific
(since it checks much more than just Arch), makes "Arch" optional, adds
support for ObjectFormat, better documents the TargetSpecific type, and
changes IFunc over to a TargetSpecificAttr.
Differential Revision: https://reviews.llvm.org/D41303
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@321201 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema')
-rw-r--r-- | lib/Sema/SemaDeclAttr.cpp | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/lib/Sema/SemaDeclAttr.cpp b/lib/Sema/SemaDeclAttr.cpp index 676d00357c..21fe46ad9d 100644 --- a/lib/Sema/SemaDeclAttr.cpp +++ b/lib/Sema/SemaDeclAttr.cpp @@ -1844,12 +1844,6 @@ static void handleIFuncAttr(Sema &S, Decl *D, const AttributeList &Attr) { S.Diag(Attr.getLoc(), diag::err_alias_is_definition) << FD << 1; return; } - // FIXME: it should be handled as a target specific attribute. - if (S.Context.getTargetInfo().getTriple().getObjectFormat() != - llvm::Triple::ELF) { - S.Diag(Attr.getLoc(), diag::warn_attribute_ignored) << Attr.getName(); - return; - } D->addAttr(::new (S.Context) IFuncAttr(Attr.getRange(), S.Context, Str, Attr.getAttributeSpellingListIndex())); |