================
@@ -148,3 +150,27 @@ mlir::Value ScalarExprEmitter::VisitCastExpr(CastExpr *ce)
{
}
return {};
}
+
+/// Return the size or alignment of the type of argument of the sizeof
+/// expression as an integer.
+mlir::Value ScalarExprEmitter::VisitUnaryExprOrTypeTraitExpr(
+ const UnaryExprOrTypeTraitExpr *e) {
+ const QualType typeToSize = e->getTypeOfArgument();
+ if (e->getKind() == UETT_SizeOf) {
+ if (const VariableArrayType *variableArrTy =
+ cgf.getContext().getAsVariableArrayType(typeToSize)) {
+ cgf.getCIRGenModule().errorNYI(e->getSourceRange(),
----------------
AmrDeveloper wrote:
Nice i used 1 as recovering value for unimplemented yet cases
https://github.com/llvm/llvm-project/pull/130847
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits