From c9ad1ca715a56ed11515911013d120486f32e8dc Mon Sep 17 00:00:00 2001 From: Aaron Ballman Date: Thu, 27 Mar 2014 22:12:09 +0000 Subject: Reapplying r204952 with fixes which should hopefully resolve linking issues with non-MSVC compilers. llvm-svn: 204968 --- clang/lib/Basic/Attributes.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 clang/lib/Basic/Attributes.cpp (limited to 'clang/lib/Basic/Attributes.cpp') diff --git a/clang/lib/Basic/Attributes.cpp b/clang/lib/Basic/Attributes.cpp new file mode 100644 index 00000000000..c882bc226d4 --- /dev/null +++ b/clang/lib/Basic/Attributes.cpp @@ -0,0 +1,17 @@ +#include "clang/Basic/Attributes.h" +#include "clang/Basic/IdentifierTable.h" +#include "llvm/ADT/StringSwitch.h" +using namespace clang; + +bool clang::HasAttribute(AttrSyntax Syntax, const IdentifierInfo *Scope, + const IdentifierInfo *Attr, const llvm::Triple &T, + const LangOptions &LangOpts) { + StringRef Name = Attr->getName(); + // Normalize the attribute name, __foo__ becomes foo. + if (Name.size() >= 4 && Name.startswith("__") && Name.endswith("__")) + Name = Name.substr(2, Name.size() - 4); + +#include "clang/Basic/AttrHasAttributeImpl.inc" + + return false; +} -- cgit v1.2.3