[flang-commits] [flang] 00c7bdf - [flang] Fix an unused variable warning
Kazu Hirata via flang-commits
flang-commits at lists.llvm.org
Thu May 25 22:36:58 PDT 2023
Author: Kazu Hirata
Date: 2023-05-25T22:36:48-07:00
New Revision: 00c7bdf80cb0d174f2f852e6b56569858120e118
URL: https://github.com/llvm/llvm-project/commit/00c7bdf80cb0d174f2f852e6b56569858120e118
DIFF: https://github.com/llvm/llvm-project/commit/00c7bdf80cb0d174f2f852e6b56569858120e118.diff
LOG: [flang] Fix an unused variable warning
This patch fixes:
flang/lib/Optimizer/HLFIR/Transforms/LowerHLFIROrderedAssignments.cpp:911:10:
error: unused variable 'inserted' [-Werror,-Wunused-variable]
Added:
Modified:
flang/lib/Optimizer/HLFIR/Transforms/LowerHLFIROrderedAssignments.cpp
Removed:
################################################################################
diff --git a/flang/lib/Optimizer/HLFIR/Transforms/LowerHLFIROrderedAssignments.cpp b/flang/lib/Optimizer/HLFIR/Transforms/LowerHLFIROrderedAssignments.cpp
index 1df0c24ca9aa0..4fc426a8af045 100644
--- a/flang/lib/Optimizer/HLFIR/Transforms/LowerHLFIROrderedAssignments.cpp
+++ b/flang/lib/Optimizer/HLFIR/Transforms/LowerHLFIROrderedAssignments.cpp
@@ -911,6 +911,7 @@ void OrderedAssignmentRewriter::generateSaveEntity(
auto inserted =
savedInCurrentRunBeforeUse.try_emplace(®ion, entity, oldYield);
assert(inserted.second && "entity must have been emplaced");
+ (void)inserted;
} else {
generateCleanupIfAny(oldYield);
}
More information about the flang-commits
mailing list