rsmith added a comment.

In D85191#2199574 <https://reviews.llvm.org/D85191#2199574>, @ebevhan wrote:

> In D85191#2197663 <https://reviews.llvm.org/D85191#2197663>, @efriedma wrote:
>
>>> If the intent is for getTypeInfo to always return sizes that are multiples 
>>> of the char size, then the design should be inverted and getTypeInfo should 
>>> simply be calling getTypeInfoInChars and multiply that result by the char 
>>> size. But that isn't how it works.
>>
>> The reason it doesn't work this way is just that someone made the wrong 
>> choice a decade ago, and nobody has spent the time to rewrite it since.  
>> Patch welcome.
>
> This does sound like a good thing to do, but it would be problematic 
> downstream since it would completely prohibit the design that we're trying to 
> use.

That would be a good thing, as the design you're trying to use is not one that 
we intend to support. The size returned by `getTypeInfo` is intended to include 
padding.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D85191

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

Reply via email to