[PATCH] D63371: Rewrite ConstStructBuilder with a mechanism that can cope with splitting and updating constants.

Richard Smith - zygoloid via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 17 10:51:05 PDT 2019


rsmith added a comment.

In D63371#1546500 <https://reviews.llvm.org/D63371#1546500>, @rjmccall wrote:

> Isn't `[[no_unique_address]]` only significant for empty members?  I'm not sure why they need significant support from constant-building, since they expand to no meaningful initializer.


It also permits reuse of tail padding for non-static data members, which is the complexity that this patch is dealing with (in addition to improving and generalizing the support for non-trivial designated initializers).

> We have some code we'll hopefully be upstreaming soon that relies on being able to do things with address-of-position placeholder values; I'm a little worried that the new structure here doesn't really support them.

Can you say a bit more about that? (Do you want to be able to emit a constant that denotes a pointer to somewhere else within the same constant being emitted, or something like that?) I think this approach should be strictly more general than what we had before, but perhaps that means it can't be extended in the direction you need?


Repository:
  rC Clang

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

https://reviews.llvm.org/D63371





More information about the cfe-commits mailing list