clang  6.0.0svn
Attributes.h
Go to the documentation of this file.
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 
14 #include "clang/Basic/TargetInfo.h"
15 
16 namespace clang {
17 
18 class IdentifierInfo;
19 
20 enum class AttrSyntax {
21  /// Is the identifier known as a GNU-style attribute?
22  GNU,
23  /// Is the identifier known as a __declspec-style attribute?
24  Declspec,
25  /// Is the identifier known as a [] Microsoft-style attribute?
26  Microsoft,
27  // Is the identifier known as a C++-style attribute?
28  CXX,
29  // Is the identifier known as a C-style attribute?
30  C,
31  // Is the identifier known as a pragma attribute?
32  Pragma
33 };
34 
35 /// \brief Return the version number associated with the attribute if we
36 /// recognize and implement the attribute specified by the given information.
37 int hasAttribute(AttrSyntax Syntax, const IdentifierInfo *Scope,
38  const IdentifierInfo *Attr, const TargetInfo &Target,
39  const LangOptions &LangOpts);
40 
41 } // end namespace clang
42 
43 #endif // LLVM_CLANG_BASIC_ATTRIBUTES_H
Is the identifier known as a __declspec-style attribute?
Is the identifier known as a GNU-style attribute?
One of these records is kept for each identifier that is lexed.
Keeps track of the various options that can be enabled, which controls the dialect of C or C++ that i...
Definition: LangOptions.h:48
AttrSyntax
Definition: Attributes.h:20
Scope - A scope is a transient data structure that is used while parsing the program.
Definition: Scope.h:39
Is the identifier known as a [] Microsoft-style attribute?
int hasAttribute(AttrSyntax Syntax, const IdentifierInfo *Scope, const IdentifierInfo *Attr, const TargetInfo &Target, const LangOptions &LangOpts)
Return the version number associated with the attribute if we recognize and implement the attribute s...
Definition: Attributes.cpp:7
Exposes information about the current target.
Definition: TargetInfo.h:55
Defines the clang::LangOptions interface.
Dataflow Directional Tag Classes.
Defines the clang::TargetInfo interface.
Attr - This represents one attribute.
Definition: Attr.h:43