[clang] f881a38 - [CodeGen] Fix a warning
Kazu Hirata via cfe-commits
cfe-commits at lists.llvm.org
Thu Nov 21 10:27:11 PST 2024
Author: Kazu Hirata
Date: 2024-11-21T10:27:05-08:00
New Revision: f881a3815a6b58afa64277eee0bb6b91a4dde103
URL: https://github.com/llvm/llvm-project/commit/f881a3815a6b58afa64277eee0bb6b91a4dde103
DIFF: https://github.com/llvm/llvm-project/commit/f881a3815a6b58afa64277eee0bb6b91a4dde103.diff
LOG: [CodeGen] Fix a warning
This patch fixes:
clang/lib/CodeGen/CGBuiltin.cpp:19287:17: error: unused variable
'Ty' [-Werror,-Wunused-variable]
Added:
Modified:
clang/lib/CodeGen/CGBuiltin.cpp
Removed:
################################################################################
diff --git a/clang/lib/CodeGen/CGBuiltin.cpp b/clang/lib/CodeGen/CGBuiltin.cpp
index 8b9dac406bad4e..ff7132fd8bc1e7 100644
--- a/clang/lib/CodeGen/CGBuiltin.cpp
+++ b/clang/lib/CodeGen/CGBuiltin.cpp
@@ -19284,8 +19284,7 @@ case Builtin::BI__builtin_hlsl_elementwise_isinf: {
}
case Builtin::BI__builtin_hlsl_wave_active_any_true: {
Value *Op = EmitScalarExpr(E->getArg(0));
- llvm::Type *Ty = Op->getType();
- assert(Ty->isIntegerTy(1) &&
+ assert(Op->getType()->isIntegerTy(1) &&
"Intrinsic WaveActiveAnyTrue operand must be a bool");
Intrinsic::ID ID = CGM.getHLSLRuntime().getWaveActiveAnyTrueIntrinsic();
More information about the cfe-commits
mailing list