Skip to content

Commit 1c8cc3b

Browse files
[X86] Use StringRef::contains (NFC) (#139379)
Note that StringRef::count counts the number of ocurrences. We can use StringRef::contains here because we only care about whether we have at least one occurrence.
1 parent 04cb2b3 commit 1c8cc3b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2032,7 +2032,7 @@ bool X86AsmParser::ParseIntelExpression(IntelExprStateMachine &SM, SMLoc &End) {
20322032
const MCExpr *Val;
20332033
if (isParsingMSInlineAsm() || Parser.isParsingMasm()) {
20342034
// MS Dot Operator expression
2035-
if (Identifier.count('.') &&
2035+
if (Identifier.contains('.') &&
20362036
(PrevTK == AsmToken::RBrac || PrevTK == AsmToken::RParen)) {
20372037
if (ParseIntelDotOperator(SM, End))
20382038
return true;

0 commit comments

Comments
 (0)