bwendling wrote: @efriedma-quic, @nickdesaulniers, @rapidsna:
This is the latest version of this patch. I believe it's ready to submit. I _really_ tried to implement @efriedma-quic's idea, but there were too corner cases that made it much trickier than first imagined. I know that it's not impossible to implement it, but the further I went along the more I realized that the infrastructure just isn't sufficient to deal with it. I would *much* rather use `EmitLValueForField`, but it's not able to handle fields deeper than the current record level. A comment in the method even admits that it can't handle anonymous structs and unions. It would be beneficial to rework `EmitLValueForField` to handle arbitrarily deep `FieldDecls`, but that's frankly beyond the scope of this patch. This patch takes advantage of the fact that the Clang front-end appends the "source element type" to the GEPs it generates. So it's therefore possible to find the pointer to the correct struct base. PTAL. https://github.com/llvm/llvm-project/pull/73730 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits