clang 19.0.0git
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
13
14namespace clang {
15
16class Expr;
17struct IdentifierLoc;
18
19/// Loop optimization hint for loop and unroll pragmas.
20struct 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.
35 Expr *ValueExpr = nullptr;
36
37 LoopHint() = default;
38};
39
40} // end namespace clang
41
42#endif // LLVM_CLANG_PARSE_LOOPHINT_H
Defines the clang::SourceLocation class and associated facilities.
This represents one expression.
Definition: Expr.h:110
A trivial tuple used to represent a source range.
The JSON file list parser is used to communicate input to InstallAPI.
Wraps an identifier and optional source location for the identifier.
Definition: ParsedAttr.h:100
Loop optimization hint for loop and unroll pragmas.
Definition: LoopHint.h:20
LoopHint()=default
SourceRange Range
Definition: LoopHint.h:22
IdentifierLoc * OptionLoc
Definition: LoopHint.h:30
IdentifierLoc * StateLoc
Definition: LoopHint.h:33
Expr * ValueExpr
Definition: LoopHint.h:35
IdentifierLoc * PragmaNameLoc
Definition: LoopHint.h:26