[clang] [clang] Ensure minimal alignment of global vars of incomplete type. (PR #72886)

Eli Friedman via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 20 11:48:52 PST 2023


https://github.com/efriedma-quic approved this pull request.

LGTM

The questions that I came up with while reviewing:

- Does this affect other targets?

It looks like it affects Lanai, but that difference seems fine.  It looks like it doesn't affect anything else in-tree; in particular, the overrides just return the default for size=0.  Maybe out-of-tree, but we can't really do much about that (unless we want to add a separate target hook, but that seems like overkill).

- Are there any possible side-effects?

Given the actual usage, this seems safe enough.  I'm a little concerned about people doing weird stuff with extern globals and linker scripts, but it looks like none of the targets where that would matter are actually impacted by this.

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


More information about the cfe-commits mailing list