[TableGen] Use StringRef::contains (NFC) (#141413)

This commit is contained in:
Kazu Hirata
2025-05-25 10:55:14 -07:00
committed by GitHub
parent 031cf05f01
commit f4b311b527

View File

@@ -252,9 +252,7 @@ public:
/// a short form without the type-specifiers, e.g. 'svld1(..)' instead of
/// 'svld1_u32(..)'.
static bool isOverloadedIntrinsic(StringRef Name) {
auto BrOpen = Name.find('[');
auto BrClose = Name.find(']');
return BrOpen != std::string::npos && BrClose != std::string::npos;
return Name.contains('[') && Name.contains(']');
}
/// Return true if the intrinsic takes a splat operand.