1 //===--- LoopHint.h - Types for LoopHint ------------------------*- C++ -*-===//
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
7 //===----------------------------------------------------------------------===//
9 #ifndef LLVM_CLANG_PARSE_LOOPHINT_H
10 #define LLVM_CLANG_PARSE_LOOPHINT_H
12 #include "clang/Basic/IdentifierTable.h"
13 #include "clang/Basic/SourceLocation.h"
14 #include "clang/Sema/Ownership.h"
15 #include "clang/Sema/ParsedAttr.h"
19 /// Loop optimization hint for loop and unroll pragmas.
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"
26 IdentifierLoc *PragmaNameLoc;
27 // Name of the loop hint. Examples: "unroll", "vectorize". In the
28 // "#pragma unroll" and "#pragma nounroll" cases, this is identical to
30 IdentifierLoc *OptionLoc;
31 // Identifier for the hint state argument. If null, then the state is
32 // default value such as for "#pragma unroll".
33 IdentifierLoc *StateLoc;
34 // Expression for the hint argument if it exists, null otherwise.
38 : PragmaNameLoc(nullptr), OptionLoc(nullptr), StateLoc(nullptr),
42 } // end namespace clang
44 #endif // LLVM_CLANG_PARSE_LOOPHINT_H