Skip to content

Commit b9b7a12

Browse files
committed
Use contains instead of find
1 parent 880bc58 commit b9b7a12

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/lib/Support/RISCVISAInfo.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -759,7 +759,7 @@ static Error processMultiLetterExtension(
759759
}
760760

761761
// Check if duplicated extension.
762-
if (!IgnoreUnknown && (SeenExtMap.find(Name.str()) != SeenExtMap.end()))
762+
if (!IgnoreUnknown && SeenExtMap.contains(Name.str()))
763763
return createStringError(errc::invalid_argument, "duplicated %s '%s'",
764764
Desc.str().c_str(), Name.str().c_str());
765765

@@ -793,7 +793,7 @@ static Error processSingleLetterExtension(
793793
RawExt = RawExt.substr(ConsumeLength);
794794

795795
// Check if duplicated extension.
796-
if (!IgnoreUnknown && (SeenExtMap.find(Name.str()) != SeenExtMap.end()))
796+
if (!IgnoreUnknown && SeenExtMap.contains(Name.str()))
797797
return createStringError(errc::invalid_argument,
798798
"duplicated standard user-level extension '%s'",
799799
Name.str().c_str());

0 commit comments

Comments
 (0)