[clang] [CIR] Fix warnings related to unused variables in release builds (PR #151412)
Andy Kaylor via cfe-commits
cfe-commits at lists.llvm.org
Wed Jul 30 15:56:25 PDT 2025
================
@@ -80,12 +80,12 @@ mlir::LogicalResult CIRGenFunction::emitStmt(const Stmt *s,
#include "clang/AST/StmtNodes.inc"
{
// Remember the block we came in on.
- mlir::Block *incoming = builder.getInsertionBlock();
+ [[maybe_unused]] mlir::Block *incoming = builder.getInsertionBlock();
----------------
andykaylor wrote:
Classic codegen uses these to erase the outgoing block if it doesn't match the incoming block and isn't used. The incubator doesn't do that, perhaps because the canonicalize pass will erase it.
https://github.com/llvm/llvm-project/pull/151412
More information about the cfe-commits
mailing list