[clang] [CIR] Make cir.alloca alignment mandatory with default 0 (PR #172663)
Andy Kaylor via cfe-commits
cfe-commits at lists.llvm.org
Mon Jan 5 11:08:08 PST 2026
================
@@ -530,7 +530,7 @@ def CIR_AllocaOp : CIR_Op<"alloca", [
StrAttr:$name,
UnitAttr:$init,
UnitAttr:$constant,
- ConfinedAttr<OptionalAttr<I64Attr>, [IntMinValue<0>]>:$alignment,
+ ConfinedAttr<DefaultValuedAttr<I64Attr, "0">, [IntMinValue<0>]>:$alignment,
----------------
andykaylor wrote:
Why do we need a default value at all? I thought we agreed that it was just going to be a required attribute, in which case the value would always be specified when the alloca is created.
https://github.com/llvm/llvm-project/pull/172663
More information about the cfe-commits
mailing list