[clang] [CIR][NFC] Remove unnecessary call to clangCmpToCIRCmp (PR #184217)
via cfe-commits
cfe-commits at lists.llvm.org
Mon Mar 2 12:09:25 PST 2026
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-clang
Author: Amr Hesham (AmrDeveloper)
<details>
<summary>Changes</summary>
Remove unnecessary call to clangCmpToCIRCmp and use the result from the previous call L1165
---
Full diff: https://github.com/llvm/llvm-project/pull/184217.diff
1 Files Affected:
- (modified) clang/lib/CIR/CodeGen/CIRGenExprScalar.cpp (-2)
``````````diff
diff --git a/clang/lib/CIR/CodeGen/CIRGenExprScalar.cpp b/clang/lib/CIR/CodeGen/CIRGenExprScalar.cpp
index 03c8369753f35..5e0c8882a9bfd 100644
--- a/clang/lib/CIR/CodeGen/CIRGenExprScalar.cpp
+++ b/clang/lib/CIR/CodeGen/CIRGenExprScalar.cpp
@@ -1197,8 +1197,6 @@ class ScalarExprEmitter : public StmtVisitor<ScalarExprEmitter, mlir::Value> {
mlir::isa<cir::PointerType>(rhs.getType())) {
cgf.cgm.errorNYI(loc, "strict vtable pointer comparisons");
}
-
- cir::CmpOpKind kind = clangCmpToCIRCmp(e->getOpcode());
result = builder.createCompare(loc, kind, lhs, rhs);
}
} else {
``````````
</details>
https://github.com/llvm/llvm-project/pull/184217
More information about the cfe-commits
mailing list