forked from OSchip/llvm-project
[OPENMP] remove redundant MapTypeModifierSpecified flag in ParseOpenMP.cpp (NFC)
Whether the map type modifier is specified or not, the flag MapTypeModifierSpecified is always set to true. Patch by Ahsan Saghir Differential Revision: https://reviews.llvm.org/D54638 llvm-svn: 347408
This commit is contained in:
parent
6f54fb0052
commit
da6bc702d0
|
@ -1775,7 +1775,6 @@ bool Parser::ParseOpenMPVarList(OpenMPDirectiveKind DKind,
|
||||||
OpenMPVarListDataTy &Data) {
|
OpenMPVarListDataTy &Data) {
|
||||||
UnqualifiedId UnqualifiedReductionId;
|
UnqualifiedId UnqualifiedReductionId;
|
||||||
bool InvalidReductionId = false;
|
bool InvalidReductionId = false;
|
||||||
bool MapTypeModifierSpecified = false;
|
|
||||||
|
|
||||||
// Parse '('.
|
// Parse '('.
|
||||||
BalancedDelimiterTracker T(*this, tok::l_paren, tok::annot_pragma_openmp_end);
|
BalancedDelimiterTracker T(*this, tok::l_paren, tok::annot_pragma_openmp_end);
|
||||||
|
@ -1878,8 +1877,6 @@ bool Parser::ParseOpenMPVarList(OpenMPDirectiveKind DKind,
|
||||||
if (Data.MapTypeModifier != OMPC_MAP_always) {
|
if (Data.MapTypeModifier != OMPC_MAP_always) {
|
||||||
Diag(Tok, diag::err_omp_unknown_map_type_modifier);
|
Diag(Tok, diag::err_omp_unknown_map_type_modifier);
|
||||||
Data.MapTypeModifier = OMPC_MAP_unknown;
|
Data.MapTypeModifier = OMPC_MAP_unknown;
|
||||||
} else {
|
|
||||||
MapTypeModifierSpecified = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ConsumeToken();
|
ConsumeToken();
|
||||||
|
@ -1904,8 +1901,6 @@ bool Parser::ParseOpenMPVarList(OpenMPDirectiveKind DKind,
|
||||||
if (Data.MapTypeModifier != OMPC_MAP_always) {
|
if (Data.MapTypeModifier != OMPC_MAP_always) {
|
||||||
Diag(Tok, diag::err_omp_unknown_map_type_modifier);
|
Diag(Tok, diag::err_omp_unknown_map_type_modifier);
|
||||||
Data.MapTypeModifier = OMPC_MAP_unknown;
|
Data.MapTypeModifier = OMPC_MAP_unknown;
|
||||||
} else {
|
|
||||||
MapTypeModifierSpecified = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ConsumeToken();
|
ConsumeToken();
|
||||||
|
@ -1942,9 +1937,7 @@ bool Parser::ParseOpenMPVarList(OpenMPDirectiveKind DKind,
|
||||||
(Kind != OMPC_reduction && Kind != OMPC_task_reduction &&
|
(Kind != OMPC_reduction && Kind != OMPC_task_reduction &&
|
||||||
Kind != OMPC_in_reduction && Kind != OMPC_depend && Kind != OMPC_map) ||
|
Kind != OMPC_in_reduction && Kind != OMPC_depend && Kind != OMPC_map) ||
|
||||||
(Kind == OMPC_reduction && !InvalidReductionId) ||
|
(Kind == OMPC_reduction && !InvalidReductionId) ||
|
||||||
(Kind == OMPC_map && Data.MapType != OMPC_MAP_unknown &&
|
(Kind == OMPC_map && Data.MapType != OMPC_MAP_unknown) ||
|
||||||
(!MapTypeModifierSpecified ||
|
|
||||||
Data.MapTypeModifier == OMPC_MAP_always)) ||
|
|
||||||
(Kind == OMPC_depend && Data.DepKind != OMPC_DEPEND_unknown);
|
(Kind == OMPC_depend && Data.DepKind != OMPC_DEPEND_unknown);
|
||||||
const bool MayHaveTail = (Kind == OMPC_linear || Kind == OMPC_aligned);
|
const bool MayHaveTail = (Kind == OMPC_linear || Kind == OMPC_aligned);
|
||||||
while (IsComma || (Tok.isNot(tok::r_paren) && Tok.isNot(tok::colon) &&
|
while (IsComma || (Tok.isNot(tok::r_paren) && Tok.isNot(tok::colon) &&
|
||||||
|
|
Loading…
Reference in New Issue