Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion flang/lib/Parser/openmp-parsers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1920,7 +1920,7 @@ struct OmpLoopConstructParser {
auto loopItem{LoopNestParser{} || ompLoopConstruct};

if (auto &&begin{OmpBeginDirectiveParser(dirs_).Parse(state)}) {
auto loopDir{begin->DirName().v};
auto loopDir{begin->DirId()};
auto assoc{llvm::omp::getDirectiveAssociation(loopDir)};
if (assoc == llvm::omp::Association::LoopNest) {
if (auto &&item{attempt(loopItem).Parse(state)}) {
Expand Down
4 changes: 2 additions & 2 deletions flang/lib/Semantics/check-omp-loop.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ void OmpStructureChecker::CheckNestedBlock(const parser::OpenMPLoopConstruct &x,
} else if (parser::Unwrap<parser::DoConstruct>(stmt)) {
++nestedCount;
} else if (auto *omp{parser::Unwrap<parser::OpenMPLoopConstruct>(stmt)}) {
if (!IsLoopTransforming(omp->BeginDir().DirName().v)) {
if (!IsLoopTransforming(omp->BeginDir().DirId())) {
context_.Say(omp->source,
"Only loop-transforming OpenMP constructs are allowed inside OpenMP loop constructs"_err_en_US);
}
Expand Down Expand Up @@ -324,7 +324,7 @@ void OmpStructureChecker::CheckFullUnroll(
// since it won't contain a loop.
if (const parser::OpenMPLoopConstruct *nested{x.GetNestedConstruct()}) {
auto &nestedSpec{nested->BeginDir()};
if (nestedSpec.DirName().v == llvm::omp::Directive::OMPD_unroll) {
if (nestedSpec.DirId() == llvm::omp::Directive::OMPD_unroll) {
bool isPartial{
llvm::any_of(nestedSpec.Clauses().v, [](const parser::OmpClause &c) {
return c.Id() == llvm::omp::Clause::OMPC_partial;
Expand Down
2 changes: 1 addition & 1 deletion flang/lib/Semantics/check-omp-structure.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2800,7 +2800,7 @@ void OmpStructureChecker::Leave(const parser::OpenMPCancelConstruct &) {
void OmpStructureChecker::Enter(const parser::OpenMPCriticalConstruct &x) {
const parser::OmpBeginDirective &beginSpec{x.BeginDir()};
const std::optional<parser::OmpEndDirective> &endSpec{x.EndDir()};
PushContextAndClauseSets(beginSpec.DirName().source, beginSpec.DirName().v);
PushContextAndClauseSets(beginSpec.DirName().source, beginSpec.DirId());

const auto &block{std::get<parser::Block>(x.t)};
CheckNoBranching(
Expand Down
2 changes: 1 addition & 1 deletion flang/lib/Semantics/resolve-directives.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2477,7 +2477,7 @@ bool OmpAttributeVisitor::Pre(const parser::OpenMPSectionConstruct &x) {

bool OmpAttributeVisitor::Pre(const parser::OpenMPCriticalConstruct &x) {
const parser::OmpBeginDirective &beginSpec{x.BeginDir()};
PushContext(beginSpec.DirName().source, beginSpec.DirName().v);
PushContext(beginSpec.DirName().source, beginSpec.DirId());
GetContext().withinConstruct = true;
return true;
}
Expand Down
2 changes: 1 addition & 1 deletion flang/lib/Semantics/rewrite-parse-tree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ static bool ReturnsDataPointer(const Symbol &symbol) {
}

static bool LoopConstructIsSIMD(parser::OpenMPLoopConstruct *ompLoop) {
return llvm::omp::allSimdSet.test(ompLoop->BeginDir().DirName().v);
return llvm::omp::allSimdSet.test(ompLoop->BeginDir().DirId());
}

// Remove non-SIMD OpenMPConstructs once they are parsed.
Expand Down