================
@@ -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,
----------------
Lancern wrote:

We agreed that the attribute should be required. The question here is should we 
have an alloca _builder_ that does not take the alignment as a parameter and 
instead infer the alignment from the alloca-ed type. We do have code in CIRGen 
that creates alloca operations without offering an alignment. It's fine to not 
have this kind of overload, in which case this patch needs to update those 
CIRGen code, too.

https://github.com/llvm/llvm-project/pull/172663
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to