1 //===--- LoopHint.h - Types for LoopHint ------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #ifndef LLVM_CLANG_SEMA_LOOPHINT_H
11 #define LLVM_CLANG_SEMA_LOOPHINT_H
13 #include "clang/Basic/IdentifierTable.h"
14 #include "clang/Basic/SourceLocation.h"
15 #include "clang/Sema/AttributeList.h"
16 #include "clang/Sema/Ownership.h"
20 /// \brief Loop optimization hint for loop and unroll pragmas.
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"
27 IdentifierLoc *PragmaNameLoc;
28 // Name of the loop hint. Examples: "unroll", "vectorize". In the
29 // "#pragma unroll" and "#pragma nounroll" cases, this is identical to
31 IdentifierLoc *OptionLoc;
32 // Identifier for the hint state argument. If null, then the state is
33 // default value such as for "#pragma unroll".
34 IdentifierLoc *StateLoc;
35 // Expression for the hint argument if it exists, null otherwise.
39 : PragmaNameLoc(nullptr), OptionLoc(nullptr), StateLoc(nullptr),
43 } // end namespace clang
45 #endif // LLVM_CLANG_SEMA_LOOPHINT_H