Skip to content

Commit 5175f52

Browse files
boomanaiden154Honey Goyal
authored andcommitted
[Clang] Fix unused variable warning from 1911ce1… (llvm#171223)
…70d689745a7d These are only used in assertions so trigger warnings in release builds. Fix this per the LLVM programming standards.
1 parent f956e40 commit 5175f52

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

clang/lib/AST/ByteCode/InterpBuiltin.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3848,9 +3848,9 @@ static bool interp_builtin_ia32_gfni_affine(InterpState &S, CodePtr OpPC,
38483848
X = S.Stk.pop<Pointer>();
38493849

38503850
const Pointer &Dst = S.Stk.peek<Pointer>();
3851-
const auto *XVecT = XType->castAs<VectorType>();
38523851
const auto *AVecT = AType->castAs<VectorType>();
3853-
assert(XVecT->getNumElements() == AVecT->getNumElements());
3852+
assert(XType->castAs<VectorType>()->getNumElements() ==
3853+
AVecT->getNumElements());
38543854
unsigned NumBytesInQWord = 8;
38553855
unsigned NumBytes = AVecT->getNumElements();
38563856
unsigned NumBitsInQWord = 64;
@@ -3905,8 +3905,8 @@ static bool interp__builtin_ia32_gfni_mul(InterpState &S, CodePtr OpPC,
39053905

39063906
const Pointer &Dst = S.Stk.peek<Pointer>();
39073907
const auto *AVecT = AType->castAs<VectorType>();
3908-
const auto *BVecT = BType->castAs<VectorType>();
3909-
assert(AVecT->getNumElements() == BVecT->getNumElements());
3908+
assert(AVecT->getNumElements() ==
3909+
BType->castAs<VectorType>()->getNumElements());
39103910

39113911
PrimType AElemT = *S.getContext().classify(AVecT->getElementType());
39123912
unsigned NumBytes = A.getNumElems();

0 commit comments

Comments
 (0)