Skip to content

Commit ac12b48

Browse files
committed
[Flang][OpenMP] NFC: Use ConstructQueue::const_iterator
This patch replaces `ConstructQueue::iterator` arguments for `ConstructQueue::const_iterator` where it's used as a pointer to an element inside of a `const ConstructQueue &` passed along with it. Since these functions don't intend to modify the list or any elements in it, keeping constness consistent between both makes it simpler to work with.
1 parent 0795ab4 commit ac12b48

File tree

3 files changed

+60
-54
lines changed

3 files changed

+60
-54
lines changed

flang/lib/Lower/OpenMP/Decomposer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ ConstructQueue buildConstructQueue(
124124
return constructs;
125125
}
126126

127-
bool isLastItemInQueue(ConstructQueue::iterator item,
127+
bool isLastItemInQueue(ConstructQueue::const_iterator item,
128128
const ConstructQueue &queue) {
129129
return std::next(item) == queue.end();
130130
}

flang/lib/Lower/OpenMP/Decomposer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ ConstructQueue buildConstructQueue(mlir::ModuleOp modOp,
4747
llvm::omp::Directive compound,
4848
const List<Clause> &clauses);
4949

50-
bool isLastItemInQueue(ConstructQueue::iterator item,
50+
bool isLastItemInQueue(ConstructQueue::const_iterator item,
5151
const ConstructQueue &queue);
5252
} // namespace Fortran::lower::omp
5353

0 commit comments

Comments
 (0)