1//===--- Attributes.h - Attributes header -----------------------*- C++ -*-===//
2//
3//                     The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9
10#ifndef LLVM_CLANG_BASIC_ATTRIBUTES_H
11#define LLVM_CLANG_BASIC_ATTRIBUTES_H
12
13#include "llvm/ADT/Triple.h"
14#include "clang/Basic/LangOptions.h"
15
16namespace clang {
17
18class IdentifierInfo;
19
20enum class AttrSyntax {
21  /// Is the attribute identifier generally known for any syntax?
22  Generic,
23  /// Is the identifier known as a GNU-style attribute?
24  GNU,
25  /// Is the identifier known as a __declspec-style attribute?
26  Declspec,
27  // Is the identifier known as a C++-style attribute?
28  CXX,
29  // Is the identifier known as a pragma attribute?
30  Pragma
31};
32
33/// \brief Return true if we recognize and implement the attribute specified by
34/// the given information.
35bool hasAttribute(AttrSyntax Syntax, const IdentifierInfo *Scope,
36                  const IdentifierInfo *Attr, const llvm::Triple &T,
37                  const LangOptions &LangOpts);
38
39} // end namespace clang
40
41#endif // LLVM_CLANG_BASIC_ATTRIBUTES_H
42