clang API Documentation

Attributes.h
Go to the documentation of this file.
00001 //===--- Attributes.h - Attributes header -----------------------*- C++ -*-===//
00002 //
00003 //                     The LLVM Compiler Infrastructure
00004 //
00005 // This file is distributed under the University of Illinois Open Source
00006 // License. See LICENSE.TXT for details.
00007 //
00008 //===----------------------------------------------------------------------===//
00009 
00010 #ifndef LLVM_CLANG_BASIC_ATTRIBUTES_H
00011 #define LLVM_CLANG_BASIC_ATTRIBUTES_H
00012 
00013 #include "llvm/ADT/Triple.h"
00014 #include "clang/Basic/LangOptions.h"
00015 
00016 namespace clang {
00017 
00018 class IdentifierInfo;
00019 
00020 enum class AttrSyntax {
00021   /// Is the attribute identifier generally known for any syntax?
00022   Generic,
00023   /// Is the identifier known as a GNU-style attribute?
00024   GNU,
00025   /// Is the identifier known as a __declspec-style attribute?
00026   Declspec,
00027   // Is the identifier known as a C++-style attribute?
00028   CXX,
00029   // Is the identifier known as a pragma attribute?
00030   Pragma
00031 };
00032 
00033 /// \brief Return the version number associated with the attribute if we
00034 /// recognize and implement the attribute specified by the given information.
00035 int hasAttribute(AttrSyntax Syntax, const IdentifierInfo *Scope,
00036                  const IdentifierInfo *Attr, const llvm::Triple &T,
00037                  const LangOptions &LangOpts);
00038 
00039 } // end namespace clang
00040 
00041 #endif // LLVM_CLANG_BASIC_ATTRIBUTES_H