]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/tools/clang/lib/Basic/Attributes.cpp
Merge clang 3.5.0 release from ^/vendor/clang/dist, resolve conflicts,
[FreeBSD/FreeBSD.git] / contrib / llvm / tools / clang / lib / Basic / Attributes.cpp
1 #include "clang/Basic/Attributes.h"
2 #include "clang/Basic/IdentifierTable.h"
3 #include "llvm/ADT/StringSwitch.h"
4 using namespace clang;
5
6 bool clang::hasAttribute(AttrSyntax Syntax, const IdentifierInfo *Scope,
7                          const IdentifierInfo *Attr, const llvm::Triple &T,
8                          const LangOptions &LangOpts) {
9   StringRef Name = Attr->getName();
10   // Normalize the attribute name, __foo__ becomes foo.
11   if (Name.size() >= 4 && Name.startswith("__") && Name.endswith("__"))
12     Name = Name.substr(2, Name.size() - 4);
13
14 #include "clang/Basic/AttrHasAttributeImpl.inc"
15
16   return false;
17 }