Skip to content

Commit ad315eb

Browse files
[MLIR][NFC]Fix unusued variable warning. (#97813)
This just changes a dyn_cast to and isa call to check for type, which avoids getting a warning in clang. The variable `ity` is not used in the next block. No functional change.
1 parent 2b56005 commit ad315eb

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

mlir/lib/Target/LLVMIR/ModuleTranslation.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -639,8 +639,7 @@ llvm::Constant *mlir::LLVM::detail::getLLVMConstant(
639639
if (llvm::ConstantDataSequential::isElementTypeCompatible(
640640
elementType)) {
641641
// TODO: Handle all compatible types. This code only handles integer.
642-
if (llvm::IntegerType *iTy =
643-
dyn_cast<llvm::IntegerType>(elementType)) {
642+
if (isa<llvm::IntegerType>(elementType)) {
644643
if (llvm::ConstantInt *ci = dyn_cast<llvm::ConstantInt>(child)) {
645644
if (ci->getBitWidth() == 8) {
646645
SmallVector<int8_t> constants(numElements, ci->getZExtValue());

0 commit comments

Comments
 (0)