[flang-commits] [flang] b331664 - [flang] Fix -Wunused-variable in BoxedProcedure.cpp (NFC)
Jie Fu via flang-commits
flang-commits at lists.llvm.org
Mon Mar 25 06:59:47 PDT 2024
Author: Jie Fu
Date: 2024-03-25T21:59:01+08:00
New Revision: b33166472c17b51b0b70a72424c2387e95f11b2d
URL: https://github.com/llvm/llvm-project/commit/b33166472c17b51b0b70a72424c2387e95f11b2d
DIFF: https://github.com/llvm/llvm-project/commit/b33166472c17b51b0b70a72424c2387e95f11b2d.diff
LOG: [flang] Fix -Wunused-variable in BoxedProcedure.cpp (NFC)
llvm-project/flang/lib/Optimizer/CodeGen/BoxedProcedure.cpp:157:12:
error: unused variable 'it' [-Werror,-Wunused-variable]
auto it = convertedTypes.try_emplace(ty, rec);
^
1 error generated.
Added:
Modified:
flang/lib/Optimizer/CodeGen/BoxedProcedure.cpp
Removed:
################################################################################
diff --git a/flang/lib/Optimizer/CodeGen/BoxedProcedure.cpp b/flang/lib/Optimizer/CodeGen/BoxedProcedure.cpp
index dccb642d5f79f0..48173033ecbe20 100644
--- a/flang/lib/Optimizer/CodeGen/BoxedProcedure.cpp
+++ b/flang/lib/Optimizer/CodeGen/BoxedProcedure.cpp
@@ -154,7 +154,7 @@ class BoxprocTypeRewriter : public mlir::TypeConverter {
ty.getName().str() + boxprocSuffix.str());
if (rec.isFinalized())
return rec;
- auto it = convertedTypes.try_emplace(ty, rec);
+ [[maybe_unused]] auto it = convertedTypes.try_emplace(ty, rec);
assert(it.second && "expected ty to not be in the map");
std::vector<RecordType::TypePair> ps = ty.getLenParamList();
std::vector<RecordType::TypePair> cs;
More information about the flang-commits
mailing list