[llvm] Fix size in bytes of type DIEs when size in bits is not a multiple of 8 (PR #69741)

Augusto Noronha via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 8 12:36:25 PST 2023


augusto2112 wrote:

> I'm still a bit confused - it seems like the actual size (like what happens if you create an array of these things? I assume it's size is actually in bytes, right?) is still in bytes. But like tail padding in C++ - sometimes derived objects can use some of that padding/size for other stuff too. It doesn't mean the base class is smaller - it's got to be a whole byte for alignment reasons, etc, but the padding bits can be reused.

Yes, the actual size is still in bytes. I think I will emit the correct size in the front end instead, but I think the current implementation that silently rounds down the bits to the bytes is wrong, so we should do something about that separately.

https://github.com/llvm/llvm-project/pull/69741


More information about the llvm-commits mailing list