Skip to content

Commit 50b178f

Browse files
committed
Remove unused variable
1 parent e814e46 commit 50b178f

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

clang/lib/CIR/CodeGen/CIRGenExprAggregate.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ void AggExprEmitter::emitArrayInit(Address destPtr, cir::ArrayType arrayTy,
157157
LValue tmpLV = LValue::makeAddr(tmpAddr, elementPtrType);
158158
cgf.emitStoreThroughLValue(RValue::get(element), tmpLV);
159159

160-
// TODO:Replace this part later with cir::DoWhileOp
160+
// TODO(CIR): Replace this part later with cir::DoWhileOp
161161
for (unsigned i = numInitElements; i != numArrayElements; ++i) {
162162
cir::LoadOp currentElement =
163163
builder.createLoad(loc, tmpAddr.getPointer());

clang/lib/CIR/CodeGen/CIRGenFunction.cpp

+1-2
Original file line numberDiff line numberDiff line change
@@ -472,8 +472,7 @@ void CIRGenFunction::emitNullInitialization(mlir::Location loc, Address destPtr,
472472
const CharUnits size = getContext().getTypeSizeInChars(ty);
473473
if (size.isZero()) {
474474
// But note that getTypeInfo returns 0 for a VLA.
475-
if (const VariableArrayType *vlatype = dyn_cast_or_null<VariableArrayType>(
476-
getContext().getAsArrayType(ty))) {
475+
if (isa<VariableArrayType>(getContext().getAsArrayType(ty))) {
477476
cgm.errorNYI(loc,
478477
"emitNullInitialization for zero size VariableArrayType");
479478
} else {

clang/lib/CIR/Dialect/IR/CIRDialect.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ LogicalResult cir::CastOp::verify() {
277277
if (!arrayPtrTy || !flatPtrTy)
278278
return emitOpError() << "requires !cir.ptr type for source and result";
279279

280-
// TODO: Make sure the AddrSpace of both types are equals
280+
// TODO(CIR): Make sure the AddrSpace of both types are equals
281281
return success();
282282
}
283283
case cir::CastKind::bitcast: {

0 commit comments

Comments
 (0)