3 Commits

Author SHA1 Message Date
Zequan Wu
879e886933 Reland "[Clang][MS] Remove assertion on BaseOffset can't be smaller than Size."
This reland 5d54213ee557a86fae82af0f75498adf02f24e82 with fixes.
2023-06-15 11:33:02 -04:00
Nico Weber
9c560350dd Revert "[Clang][MS] Remove assertion on BaseOffset can't be smaller than Size."
This reverts commit 5d54213ee557a86fae82af0f75498adf02f24e82.

Breaks check-clang on Windows, see https://reviews.llvm.org/D152472#4422913
2023-06-14 16:19:48 -07:00
Zequan Wu
5d54213ee5 [Clang][MS] Remove assertion on BaseOffset can't be smaller than Size.
This assertion triggered when we have two base classes sharing the same offset
and the first base is empty and the second class is non-empty.
Remove it for correctness.

I can't add a test case for this because -foverride-record-layout doesn't read
base class info at all. I can add that support later for testing if needed.

Reviewed By: rnk

Differential Revision: https://reviews.llvm.org/D152472
2023-06-14 16:48:26 -04:00