[flang-commits] [flang] a678ed4 - [flang] Use DenseMap::lookup (NFC)
Kazu Hirata via flang-commits
flang-commits at lists.llvm.org
Sun Aug 27 08:26:58 PDT 2023
Author: Kazu Hirata
Date: 2023-08-27T08:26:48-07:00
New Revision: a678ed41d24983bd1fb78b98fd790e3381979d44
URL: https://github.com/llvm/llvm-project/commit/a678ed41d24983bd1fb78b98fd790e3381979d44
DIFF: https://github.com/llvm/llvm-project/commit/a678ed41d24983bd1fb78b98fd790e3381979d44.diff
LOG: [flang] Use DenseMap::lookup (NFC)
Added:
Modified:
flang/lib/Lower/Bridge.cpp
Removed:
################################################################################
diff --git a/flang/lib/Lower/Bridge.cpp b/flang/lib/Lower/Bridge.cpp
index 51018b8122e81c..bf66d2402eb9b6 100644
--- a/flang/lib/Lower/Bridge.cpp
+++ b/flang/lib/Lower/Bridge.cpp
@@ -501,10 +501,7 @@ class FirConverter : public Fortran::lower::AbstractConverter {
lookupLabel(Fortran::lower::pft::Label label) override final {
Fortran::lower::pft::FunctionLikeUnit &owningProc =
*getEval().getOwningProcedure();
- auto iter = owningProc.labelEvaluationMap.find(label);
- if (iter == owningProc.labelEvaluationMap.end())
- return nullptr;
- return iter->second;
+ return owningProc.labelEvaluationMap.lookup(label);
}
fir::ExtendedValue
More information about the flang-commits
mailing list