Author: Kazu Hirata Date: 2024-01-12T22:08:28-08:00 New Revision: 6bd488dd24cc06daea0d9a9dea0e2843f4c8d38e
URL: https://github.com/llvm/llvm-project/commit/6bd488dd24cc06daea0d9a9dea0e2843f4c8d38e DIFF: https://github.com/llvm/llvm-project/commit/6bd488dd24cc06daea0d9a9dea0e2843f4c8d38e.diff LOG: [CodeGen] Use DenseMap::contains (NFC) Added: Modified: clang/lib/CodeGen/CoverageMappingGen.cpp Removed: ################################################################################ diff --git a/clang/lib/CodeGen/CoverageMappingGen.cpp b/clang/lib/CodeGen/CoverageMappingGen.cpp index b245abd16c3f4a..916016601a9327 100644 --- a/clang/lib/CodeGen/CoverageMappingGen.cpp +++ b/clang/lib/CodeGen/CoverageMappingGen.cpp @@ -730,8 +730,8 @@ struct MCDCCoverageBuilder { return; // If binary expression is disqualified, don't do mapping. - if (NestLevel.empty() && MCDCBitmapMap.find(CodeGenFunction::stripCond( - E)) == MCDCBitmapMap.end()) + if (NestLevel.empty() && + !MCDCBitmapMap.contains(CodeGenFunction::stripCond(E))) NotMapped = true; // Push Stmt on 'NestLevel' stack to keep track of nest location. @@ -744,7 +744,7 @@ struct MCDCCoverageBuilder { // If the operator itself has an assigned ID, this means it represents a // larger subtree. In this case, pop its ID out of the RHS stack and // assign that ID to its LHS node. Its RHS will receive a new ID. - if (CondIDs.find(CodeGenFunction::stripCond(E)) != CondIDs.end()) { + if (CondIDs.contains(CodeGenFunction::stripCond(E))) { // If Stmt has an ID, assign its ID to LHS CondIDs[CodeGenFunction::stripCond(E->getLHS())] = CondIDs[E]; _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits