Skip to content

Commit e4375bf

Browse files
committed
[X86] Fix warning about unused variable [NFC]
Without this gcc complains like ../lib/Target/X86/X86FixupVectorConstants.cpp:70:13: warning: unused variable 'CUndef' [-Wunused-variable] 70 | if (auto *CUndef = dyn_cast<UndefValue>(C)) | ^~~~~~ Remove the unused variable and change dyn_cast to isa.
1 parent bcd14b0 commit e4375bf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/Target/X86/X86FixupVectorConstants.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ FunctionPass *llvm::createX86FixupVectorConstants() {
6767
static std::optional<APInt> extractConstantBits(const Constant *C) {
6868
unsigned NumBits = C->getType()->getPrimitiveSizeInBits();
6969

70-
if (auto *CUndef = dyn_cast<UndefValue>(C))
70+
if (isa<UndefValue>(C))
7171
return APInt::getZero(NumBits);
7272

7373
if (auto *CInt = dyn_cast<ConstantInt>(C))

0 commit comments

Comments
 (0)