Skip to content

Commit 4c0daac

Browse files
bcardosolopeslanza
authored andcommitted
[CIR] Fix unused variable and covered switch default warnings
1 parent 0fe05fa commit 4c0daac

File tree

2 files changed

+0
-4
lines changed

2 files changed

+0
-4
lines changed

clang/lib/CIR/CodeGen/CIRGenCXX.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,6 @@ static void buildDeclInit(CIRGenFunction &CGF, const VarDecl *D,
4545
llvm_unreachable("scalar evaluation NYI");
4646
case TEK_Complex:
4747
llvm_unreachable("complext evaluation NYI");
48-
default:
49-
llvm_unreachable("bad evaluation kind");
5048
}
5149
}
5250

clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVM.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1164,8 +1164,6 @@ class CIRGlobalOpLowering
11641164
// Failed to use a compact attribute as an initializer:
11651165
// initialize elements individually.
11661166
if (!(init = lowerConstArrayAttr(constArr, getTypeConverter()))) {
1167-
auto eltTy =
1168-
constArr.getType().cast<mlir::cir::ArrayType>().getEltType();
11691167
setupRegionInitializedLLVMGlobalOp(op, rewriter);
11701168
rewriter.create<mlir::LLVM::ReturnOp>(
11711169
op->getLoc(), lowerCirAttrAsValue(constArr, op->getLoc(),

0 commit comments

Comments
 (0)