[CIR][NFC] Fix warnings in release builds (#168791)
This fixes several warnings that occur in CIR release builds.
This commit is contained in:
parent
ff39d59000
commit
ef0cd1dae3
@ -292,7 +292,7 @@ emitSuspendExpression(CIRGenFunction &cgf, CGCoroData &coro,
|
||||
AggValueSlot aggSlot, bool ignoreResult,
|
||||
mlir::Block *scopeParentBlock,
|
||||
mlir::Value &tmpResumeRValAddr, bool forLValue) {
|
||||
mlir::LogicalResult awaitBuild = mlir::success();
|
||||
[[maybe_unused]] mlir::LogicalResult awaitBuild = mlir::success();
|
||||
LValueOrRValue awaitRes;
|
||||
|
||||
CIRGenFunction::OpaqueValueMapping binder =
|
||||
|
||||
@ -425,7 +425,7 @@ void CIRGenFunction::exitCXXTryStmt(const CXXTryStmt &s, bool isFnTryBlock) {
|
||||
assert(!cir::MissingFeatures::incrementProfileCounter());
|
||||
|
||||
// Perform the body of the catch.
|
||||
mlir::LogicalResult emitResult =
|
||||
[[maybe_unused]] mlir::LogicalResult emitResult =
|
||||
emitStmt(catchStmt->getHandlerBlock(), /*useCurrentScope=*/true);
|
||||
assert(emitResult.succeeded() && "failed to emit catch handler block");
|
||||
|
||||
|
||||
@ -426,7 +426,7 @@ static mlir::Value emitCXXNewAllocSize(CIRGenFunction &cgf, const CXXNewExpr *e,
|
||||
const llvm::APInt &count =
|
||||
mlir::cast<cir::IntAttr>(constNumElements).getValue();
|
||||
|
||||
unsigned numElementsWidth = count.getBitWidth();
|
||||
[[maybe_unused]] unsigned numElementsWidth = count.getBitWidth();
|
||||
bool hasAnyOverflow = false;
|
||||
|
||||
// The equivalent code in CodeGen/CGExprCXX.cpp handles these cases as
|
||||
|
||||
@ -459,7 +459,8 @@ void CIRGenItaniumCXXABI::emitVTableDefinitions(CIRGenVTables &cgvt,
|
||||
"emitVTableDefinitions: __fundamental_type_info");
|
||||
}
|
||||
|
||||
auto vtableAsGlobalValue = dyn_cast<cir::CIRGlobalValueInterface>(*vtable);
|
||||
[[maybe_unused]] auto vtableAsGlobalValue =
|
||||
dyn_cast<cir::CIRGlobalValueInterface>(*vtable);
|
||||
assert(vtableAsGlobalValue && "VTable must support CIRGlobalValueInterface");
|
||||
// Always emit type metadata on non-available_externally definitions, and on
|
||||
// available_externally definitions if we are performing whole program
|
||||
|
||||
@ -462,7 +462,7 @@ static mlir::Type higherPrecisionElementTypeForComplexArithmetic(
|
||||
return info.getFloat128Format();
|
||||
}
|
||||
|
||||
assert(false && "Unsupported float type semantics");
|
||||
llvm_unreachable("Unsupported float type semantics");
|
||||
};
|
||||
|
||||
const mlir::Type higherElementType = getHigherPrecisionFPType(elementType);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user