clang  9.0.0svn
LoopHint.h
Go to the documentation of this file.
1 //===--- LoopHint.h - Types for LoopHint ------------------------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
9 #ifndef LLVM_CLANG_PARSE_LOOPHINT_H
10 #define LLVM_CLANG_PARSE_LOOPHINT_H
11 
14 #include "clang/Sema/Ownership.h"
15 #include "clang/Sema/ParsedAttr.h"
16 
17 namespace clang {
18 
19 /// Loop optimization hint for loop and unroll pragmas.
20 struct LoopHint {
21  // Source range of the directive.
23  // Identifier corresponding to the name of the pragma. "loop" for
24  // "#pragma clang loop" directives and "unroll" for "#pragma unroll"
25  // hints.
27  // Name of the loop hint. Examples: "unroll", "vectorize". In the
28  // "#pragma unroll" and "#pragma nounroll" cases, this is identical to
29  // PragmaNameLoc.
31  // Identifier for the hint state argument. If null, then the state is
32  // default value such as for "#pragma unroll".
34  // Expression for the hint argument if it exists, null otherwise.
36 
38  : PragmaNameLoc(nullptr), OptionLoc(nullptr), StateLoc(nullptr),
39  ValueExpr(nullptr) {}
40 };
41 
42 } // end namespace clang
43 
44 #endif // LLVM_CLANG_PARSE_LOOPHINT_H
IdentifierLoc * PragmaNameLoc
Definition: LoopHint.h:26
IdentifierLoc * OptionLoc
Definition: LoopHint.h:30
IdentifierLoc * StateLoc
Definition: LoopHint.h:33
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: ParsedAttr.h:94
Dataflow Directional Tag Classes.
Expr * ValueExpr
Definition: LoopHint.h:35
Defines the clang::SourceLocation class and associated facilities.
SourceRange Range
Definition: LoopHint.h:22
Loop optimization hint for loop and unroll pragmas.
Definition: LoopHint.h:20
A trivial tuple used to represent a source range.