Skip to content

Commit 928393b

Browse files
authored
[flang][OpenMP] Remove dead code left over after PR143715, NFC (#167941)
In PrivatizeAssociatedLoopIndexAndCheckLoopLevel we now descend all the way down the chain of nested OpenMPLoopDirectives ahead of time, so innerMostNest can only be a nullptr, or a DoConstruct.
1 parent 3b83e7f commit 928393b

File tree

1 file changed

+0
-16
lines changed

1 file changed

+0
-16
lines changed

flang/lib/Semantics/resolve-directives.cpp

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2446,22 +2446,6 @@ void OmpAttributeVisitor::PrivatizeAssociatedLoopIndexAndCheckLoopLevel(
24462446
}
24472447
}
24482448
CheckAssocLoopLevel(level, GetAssociatedClause());
2449-
} else if (const auto *loop{std::get_if<
2450-
common::Indirection<parser::OpenMPLoopConstruct>>(
2451-
innerMostNest)}) {
2452-
const parser::OmpDirectiveSpecification &beginSpec{
2453-
loop->value().BeginDir()};
2454-
const parser::OmpDirectiveName &beginName{beginSpec.DirName()};
2455-
if (beginName.v != llvm::omp::Directive::OMPD_unroll &&
2456-
beginName.v != llvm::omp::Directive::OMPD_tile) {
2457-
context_.Say(GetContext().directiveSource,
2458-
"Only UNROLL or TILE constructs are allowed between an OpenMP Loop Construct and a DO construct"_err_en_US,
2459-
parser::ToUpperCaseLetters(llvm::omp::getOpenMPDirectiveName(
2460-
GetContext().directive, version)
2461-
.str()));
2462-
} else {
2463-
PrivatizeAssociatedLoopIndexAndCheckLoopLevel(loop->value());
2464-
}
24652449
} else {
24662450
context_.Say(GetContext().directiveSource,
24672451
"A DO loop must follow the %s directive"_err_en_US,

0 commit comments

Comments
 (0)