]> granicus.if.org Git - clang/commit
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)
commit229c2a388573e4e5cb5cf5f1e29e3b55949b0297
tree43fb822a53dce513e3a835a478894280de371869
parent9f12dc464fb4c0952a13a00883326910f1a0ec58
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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@214333 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Basic/Attr.td
include/clang/Basic/DiagnosticParseKinds.td
include/clang/Basic/DiagnosticSemaKinds.td
include/clang/Parse/Parser.h
include/clang/Sema/LoopHint.h
lib/CodeGen/CGStmt.cpp
lib/Parse/ParsePragma.cpp
lib/Parse/ParseStmt.cpp
lib/Sema/SemaStmtAttr.cpp
test/Parser/pragma-loop.cpp