[clang] 2fdb09c - [CIR] Fix unused variable warning (#195130)
via cfe-commits
cfe-commits at lists.llvm.org
Thu Apr 30 12:51:03 PDT 2026
Author: Andy Kaylor
Date: 2026-04-30T12:50:58-07:00
New Revision: 2fdb09cf65e680094bdb3573435467ae544c7490
URL: https://github.com/llvm/llvm-project/commit/2fdb09cf65e680094bdb3573435467ae544c7490
DIFF: https://github.com/llvm/llvm-project/commit/2fdb09cf65e680094bdb3573435467ae544c7490.diff
LOG: [CIR] Fix unused variable warning (#195130)
This fixes a warning about a variable that was only being used in an
assert.
Added:
Modified:
clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVM.h
Removed:
################################################################################
diff --git a/clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVM.h b/clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVM.h
index 6133900c503b8..c0abb40b7304e 100644
--- a/clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVM.h
+++ b/clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVM.h
@@ -40,7 +40,7 @@ struct LLVMBlockAddressInfo {
uint32_t getTagIndex() { return blockTagOpIndex++; }
void mapBlockTag(cir::BlockAddrInfoAttr info, mlir::LLVM::BlockTagOp tagOp) {
- auto result = blockInfoToTagOp.try_emplace(info, tagOp);
+ [[maybe_unused]] auto result = blockInfoToTagOp.try_emplace(info, tagOp);
assert(result.second &&
"attempting to map a BlockTag operation that is already mapped");
}
More information about the cfe-commits
mailing list