aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKazu Hirata <kazu@google.com>2025-04-28 09:34:27 -0700
committerGitHub <noreply@github.com>2025-04-28 09:34:27 -0700
commit044ff78adcf6e5c6848ea8a8bb9dec2f4a32066c (patch)
tree67911bb157d0528674f6e780e35bdf4b6630786a
parent0d567994570becad7022524bfb50b78b03c04ced (diff)
downloadllvm-044ff78adcf6e5c6848ea8a8bb9dec2f4a32066c.zip
llvm-044ff78adcf6e5c6848ea8a8bb9dec2f4a32066c.tar.gz
llvm-044ff78adcf6e5c6848ea8a8bb9dec2f4a32066c.tar.bz2
[TableGen] Simplify a string comparison (NFC) (#137584)
-rw-r--r--llvm/utils/TableGen/DXILEmitter.cpp3
1 files changed, 1 insertions, 2 deletions
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 @@ 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()) {