clang  6.0.0svn
LoopHint.h
Go to the documentation of this file.
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 
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.
24  // Identifier corresponding to the name of the pragma. "loop" for
25  // "#pragma clang loop" directives and "unroll" for "#pragma unroll"
26  // hints.
28  // Name of the loop hint. Examples: "unroll", "vectorize". In the
29  // "#pragma unroll" and "#pragma nounroll" cases, this is identical to
30  // PragmaNameLoc.
32  // Identifier for the hint state argument. If null, then the state is
33  // default value such as for "#pragma unroll".
35  // Expression for the hint argument if it exists, null otherwise.
37 
39  : PragmaNameLoc(nullptr), OptionLoc(nullptr), StateLoc(nullptr),
40  ValueExpr(nullptr) {}
41 };
42 
43 } // end namespace clang
44 
45 #endif // LLVM_CLANG_SEMA_LOOPHINT_H
IdentifierLoc * PragmaNameLoc
Definition: LoopHint.h:27
IdentifierLoc * OptionLoc
Definition: LoopHint.h:31
IdentifierLoc * StateLoc
Definition: LoopHint.h:34
Expr - This represents one expression.
Definition: Expr.h:106
Defines the clang::IdentifierInfo, clang::IdentifierTable, and clang::Selector interfaces.
Wraps an identifier and optional source location for the identifier.
Definition: AttributeList.h:73
Dataflow Directional Tag Classes.
Expr * ValueExpr
Definition: LoopHint.h:36
Defines the clang::SourceLocation class and associated facilities.
SourceRange Range
Definition: LoopHint.h:23
Loop optimization hint for loop and unroll pragmas.
Definition: LoopHint.h:21
A trivial tuple used to represent a source range.