================
@@ -1366,15 +1366,16 @@ mlir::Attribute ConstantEmitter::tryEmitPrivate(const
APValue &value,
while (!elts.empty() && builder.isNullValue(elts.back()))
elts.pop_back();
- if (elts.empty())
- return cir::ZeroAttr::get(desiredType);
-
+ // For flexible array members, we need to adjust the size of our result to
+ // match this.
if (desiredType.getSize() == 0 && numElements > 0) {
- cgm.errorNYI("ConstExprEmitter::tryEmitPrivate array type as flexible "
- "array member");
- return {};
+ desiredType =
----------------
andykaylor wrote:
Yeah, that seems reasonable.
https://github.com/llvm/llvm-project/pull/206564
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits