[flang-commits] [flang] fa57143 - [Flang][OpenMP] Fix unused variable warning/error
Kiran Chandramohan via flang-commits
flang-commits at lists.llvm.org
Fri Mar 3 08:10:15 PST 2023
Author: Kiran Chandramohan
Date: 2023-03-03T16:03:32Z
New Revision: fa5714387f207cf8890a95fb0bd737849091063b
URL: https://github.com/llvm/llvm-project/commit/fa5714387f207cf8890a95fb0bd737849091063b
DIFF: https://github.com/llvm/llvm-project/commit/fa5714387f207cf8890a95fb0bd737849091063b.diff
LOG: [Flang][OpenMP] Fix unused variable warning/error
Added:
Modified:
flang/lib/Lower/OpenMP.cpp
Removed:
################################################################################
diff --git a/flang/lib/Lower/OpenMP.cpp b/flang/lib/Lower/OpenMP.cpp
index ff514476e4b2..8fcf0ba226a5 100644
--- a/flang/lib/Lower/OpenMP.cpp
+++ b/flang/lib/Lower/OpenMP.cpp
@@ -168,9 +168,7 @@ void dataSharingProcessor::collectSymbolsForPrivatization() {
&clause.u)) {
collectOmpObjectListSymbol(lastPrivateClause->v, privatizedSymbols);
hasLastPrivateOp = true;
- } else if (const auto &collapseClause =
- std::get_if<Fortran::parser::OmpClause::Collapse>(
- &clause.u)) {
+ } else if (std::get_if<Fortran::parser::OmpClause::Collapse>(&clause.u)) {
hasCollapse = true;
}
}
@@ -204,8 +202,7 @@ void dataSharingProcessor::insertLastPrivateCompare(mlir::Operation *op) {
mlir::arith::CmpIOp cmpOp;
bool cmpCreated = false;
for (const Fortran::parser::OmpClause &clause : opClauseList.v) {
- if (const auto &lastPrivateClause =
- std::get_if<Fortran::parser::OmpClause::Lastprivate>(&clause.u)) {
+ if (std::get_if<Fortran::parser::OmpClause::Lastprivate>(&clause.u)) {
// TODO: Add lastprivate support for simd construct
if (mlir::isa<omp::SectionOp>(op)) {
if (&eval == &eval.parentConstruct->getLastNestedEvaluation()) {
More information about the flang-commits
mailing list