From 55ed7ba7ab84271a30eb73639c90d83f5bd72af5 Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Fri, 16 Jun 2023 07:48:20 -0700 Subject: [PATCH] [Driver] Use DenseSet::contains (NFC) --- clang/lib/Driver/ToolChain.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/clang/lib/Driver/ToolChain.cpp b/clang/lib/Driver/ToolChain.cpp index 0903b0a..4250458 100644 --- a/clang/lib/Driver/ToolChain.cpp +++ b/clang/lib/Driver/ToolChain.cpp @@ -185,10 +185,10 @@ static void getAArch64MultilibFlags(const Driver &D, UnifiedFeatures.end()); std::vector MArch; for (const auto &Ext : AArch64::Extensions) - if (FeatureSet.find(Ext.Feature) != FeatureSet.end()) + if (FeatureSet.contains(Ext.Feature)) MArch.push_back(Ext.Name.str()); for (const auto &Ext : AArch64::Extensions) - if (FeatureSet.find(Ext.NegFeature) != FeatureSet.end()) + if (FeatureSet.contains(Ext.NegFeature)) MArch.push_back(("no" + Ext.Name).str()); MArch.insert(MArch.begin(), ("-march=" + Triple.getArchName()).str()); Result.push_back(llvm::join(MArch, "+")); @@ -206,10 +206,10 @@ static void getARMMultilibFlags(const Driver &D, UnifiedFeatures.end()); std::vector MArch; for (const auto &Ext : ARM::ARCHExtNames) - if (FeatureSet.find(Ext.Feature) != FeatureSet.end()) + if (FeatureSet.contains(Ext.Feature)) MArch.push_back(Ext.Name.str()); for (const auto &Ext : ARM::ARCHExtNames) - if (FeatureSet.find(Ext.NegFeature) != FeatureSet.end()) + if (FeatureSet.contains(Ext.NegFeature)) MArch.push_back(("no" + Ext.Name).str()); MArch.insert(MArch.begin(), ("-march=" + Triple.getArchName()).str()); Result.push_back(llvm::join(MArch, "+")); -- 2.7.4