[TableGen] Simplify a string comparison (NFC) (#137584)

This commit is contained in:
Kazu Hirata 2025-04-28 09:34:27 -07:00 committed by GitHub
parent 0d56799457
commit 044ff78adc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -172,10 +172,9 @@ DXILOperationDesc::DXILOperationDesc(const Record *R) {
// Get the operation class
OpClass = R->getValueAsDef("OpClass")->getName();
if (!OpClass.str().compare("UnknownOpClass")) {
if (OpClass.str() == "UnknownOpClass")
PrintFatalError(R, Twine("Unspecified DXIL OpClass for DXIL operation - ") +
OpName);
}
auto IntrinsicSelectRecords = R->getValueAsListOfDefs("intrinsics");
if (IntrinsicSelectRecords.size()) {