Skip to content

Commit 3692995

Browse files
[CodeGen] Fix warnings
This patch fixes: clang/lib/CodeGen/CGBuiltin.cpp:18677:11: error: unused variable 'XVecTy1' [-Werror,-Wunused-variable] clang/lib/CodeGen/CGBuiltin.cpp:18678:11: error: unused variable 'XVecTy2' [-Werror,-Wunused-variable]
1 parent a1ff427 commit 3692995

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

clang/lib/CodeGen/CGBuiltin.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18674,10 +18674,10 @@ Value *CodeGenFunction::EmitHLSLBuiltinExpr(unsigned BuiltinID,
1867418674
E->getArg(1)->getType()->hasFloatingRepresentation() &&
1867518675
"cross operands must have a float representation");
1867618676
// make sure each vector has exactly 3 elements
18677-
auto *XVecTy1 = E->getArg(0)->getType()->getAs<VectorType>();
18678-
auto *XVecTy2 = E->getArg(1)->getType()->getAs<VectorType>();
18679-
assert(XVecTy1->getNumElements() == 3 && XVecTy2->getNumElements() == 3 &&
18680-
"input vectors must have 3 elements each");
18677+
assert(
18678+
E->getArg(0)->getType()->getAs<VectorType>()->getNumElements() == 3 &&
18679+
E->getArg(1)->getType()->getAs<VectorType>()->getNumElements() == 3 &&
18680+
"input vectors must have 3 elements each");
1868118681
return Builder.CreateIntrinsic(
1868218682
/*ReturnType=*/Op0->getType(), CGM.getHLSLRuntime().getCrossIntrinsic(),
1868318683
ArrayRef<Value *>{Op0, Op1}, nullptr, "hlsl.cross");

0 commit comments

Comments
 (0)