[TableGen] Simplify a string comparison (NFC) (#137584)
diff --git a/llvm/utils/TableGen/DXILEmitter.cpp b/llvm/utils/TableGen/DXILEmitter.cpp
index 0364b02..09ce9f3 100644
--- a/llvm/utils/TableGen/DXILEmitter.cpp
+++ b/llvm/utils/TableGen/DXILEmitter.cpp
@@ -172,10 +172,9 @@
// 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()) {