Skip to content

Commit e57522f

Browse files
committed
Use contains instead of find
1 parent 357a77d commit e57522f

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
@@ -758,7 +758,7 @@ static Error processMultiLetterExtension(
758758
}
759759

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

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

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

0 commit comments

Comments
 (0)