Skip to content

Conversation

@Michael137
Copy link

In llvm#96422 we started treating empty records as zero-sized for the purpose of layout. In C, empty fields were never considered isZeroSize, so we would never have tried to call Init->hasSideEffects on them. But since
llvm#96422 we can get here when compiling C, but Init need not exist. This patch adds a null-check to account for this situtation.

(cherry picked from commit 2162a18)

…lvm#109271)

In llvm#96422 we started treating
empty records as zero-sized for the purpose of layout. In `C`, empty
fields were never considered `isZeroSize`, so we would never have tried
to call `Init->hasSideEffects` on them. But since
llvm#96422 we can get here when
compiling `C`, but `Init` need not exist. This patch adds a null-check
to account for this situtation.

(cherry picked from commit 2162a18)
@Michael137 Michael137 merged commit 4f20946 into stable/20240723 Sep 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants