[clang] a176669 - [clang] Fix -Wunused-variable in CGBuiltin.cpp (NFC)
Jie Fu via cfe-commits
cfe-commits at lists.llvm.org
Mon Dec 16 17:07:57 PST 2024
Author: Jie Fu
Date: 2024-12-17T09:07:44+08:00
New Revision: a1766699c66e7b9f8094256f98de57ba79099e94
URL: https://github.com/llvm/llvm-project/commit/a1766699c66e7b9f8094256f98de57ba79099e94
DIFF: https://github.com/llvm/llvm-project/commit/a1766699c66e7b9f8094256f98de57ba79099e94.diff
LOG: [clang] Fix -Wunused-variable in CGBuiltin.cpp (NFC)
/llvm-project/clang/lib/CodeGen/CGBuiltin.cpp:19441:17:
error: unused variable 'Ty' [-Werror,-Wunused-variable]
llvm::Type *Ty = Op->getType();
^
1 error generated.
Added:
Modified:
clang/lib/CodeGen/CGBuiltin.cpp
Removed:
################################################################################
diff --git a/clang/lib/CodeGen/CGBuiltin.cpp b/clang/lib/CodeGen/CGBuiltin.cpp
index 37a32718fab378..4d4b7428abd505 100644
--- a/clang/lib/CodeGen/CGBuiltin.cpp
+++ b/clang/lib/CodeGen/CGBuiltin.cpp
@@ -19438,8 +19438,7 @@ case Builtin::BI__builtin_hlsl_elementwise_isinf: {
}
case Builtin::BI__builtin_hlsl_wave_active_all_true: {
Value *Op = EmitScalarExpr(E->getArg(0));
- llvm::Type *Ty = Op->getType();
- assert(Ty->isIntegerTy(1) &&
+ assert(Op->getType()->isIntegerTy(1) &&
"Intrinsic WaveActiveAllTrue operand must be a bool");
Intrinsic::ID ID = CGM.getHLSLRuntime().getWaveActiveAllTrueIntrinsic();
More information about the cfe-commits
mailing list