]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/tools/clang/include/clang/Sema/LoopHint.h
Merge clang 3.5.0 release from ^/vendor/clang/dist, resolve conflicts,
[FreeBSD/FreeBSD.git] / contrib / llvm / tools / clang / include / clang / Sema / LoopHint.h
1 //===--- LoopHint.h - Types for LoopHint ------------------------*- 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_SEMA_LOOPHINT_H
11 #define LLVM_CLANG_SEMA_LOOPHINT_H
12
13 #include "clang/Basic/IdentifierTable.h"
14 #include "clang/Basic/SourceLocation.h"
15 #include "clang/Sema/AttributeList.h"
16 #include "clang/Sema/Ownership.h"
17
18 namespace clang {
19
20 /// \brief Loop optimization hint for loop and unroll pragmas.
21 struct LoopHint {
22   // Source range of the directive.
23   SourceRange Range;
24   // Identifier corresponding to the name of the pragma.  "loop" for
25   // "#pragma clang loop" directives and "unroll" for "#pragma unroll"
26   // hints.
27   IdentifierLoc *PragmaNameLoc;
28   // Name of the loop hint.  Examples: "unroll", "vectorize".  In the
29   // "#pragma unroll" case, this is identical to PragmaNameLoc.
30   IdentifierLoc *OptionLoc;
31   // Identifier for the hint argument.  If null, then the hint has no argument
32   // such as for "#pragma unroll".
33   IdentifierLoc *ValueLoc;
34   // Expression for the hint argument if it exists, null otherwise.
35   Expr *ValueExpr;
36 };
37
38 } // end namespace clang
39
40 #endif // LLVM_CLANG_SEMA_LOOPHINT_H