Add a state variable to the loop hint attribute.
authorTyler Nowicki <tnowicki@apple.com>
Wed, 30 Jul 2014 20:54:33 +0000 (20:54 +0000)
committerTyler Nowicki <tnowicki@apple.com>
Wed, 30 Jul 2014 20:54:33 +0000 (20:54 +0000)
commitcab7ca3e2a64869f6acaf730e0fb032bf1299bd7
treeea3db3d8f014eeb585201ce62896e00006e65c2f
parentfee94b47ed5558a823702840075daffbda8d4f04
Add a state variable to the loop hint attribute.

This patch is necessary to support constant expressions which replaces the integer value in the loop hint attribute with an expression. The integer value was also storing the pragma’s state for options like vectorize(enable/disable) and the pragma unroll and nounroll directive. The state variable is introduced to hold the state of those options/pragmas. This moves the validation of the state (keywords) from SemaStmtAttr handler to the loop hint annotation token handler.

Reviewed by Aaron Ballman

llvm-svn: 214333
clang/include/clang/Basic/Attr.td
clang/include/clang/Basic/DiagnosticParseKinds.td
clang/include/clang/Basic/DiagnosticSemaKinds.td
clang/include/clang/Parse/Parser.h
clang/include/clang/Sema/LoopHint.h
clang/lib/CodeGen/CGStmt.cpp
clang/lib/Parse/ParsePragma.cpp
clang/lib/Parse/ParseStmt.cpp
clang/lib/Sema/SemaStmtAttr.cpp
clang/test/Parser/pragma-loop.cpp