rsmith added a comment.

In D124221#3469251 <https://reviews.llvm.org/D124221#3469251>, @rsmith wrote:

> I think we can address most of my concerns with `__builtin_dump_struct` 
> without a new builtin, by incorporating things from this implementation

Done; this patch now reimplements `__builtin_dump_struct` using the `Sema` 
desugaring approach rather than providing a new builtin. As in the prior patch, 
we still support passing an arbitrary callable and additional arguments, and in 
C++ we support constant-evaluation of the dump as well as generic printing of 
field values even for types that the builtin doesn't natively understand. But 
the interface remains simple enough that you can just call 
`__builtin_dump_struct(&s, printf)` or `__builtin_dump_struct(&s, fprintf, 
stderr)` and get a dump to stdout / stderr.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D124221/new/

https://reviews.llvm.org/D124221

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to