Make globals used for array initialization codegen constant
authorHans Wennborg <hans@chromium.org>
Thu, 16 Mar 2023 10:23:31 +0000 (11:23 +0100)
committerHans Wennborg <hans@chromium.org>
Fri, 17 Mar 2023 08:23:34 +0000 (09:23 +0100)
commit4a2757d80f0af48e65d90e7eaf268f78bcfa997f
tree736f1d1ade439c4eec485ba41f46c5c592f04896
parentc21790d02302ca0c00fab15c49c14db6514ceb5e
Make globals used for array initialization codegen constant

As pointed out in D133835 these globals will never be written to
(they're only used for trivially copyable types), so they can always be
constant.

Differential revision: https://reviews.llvm.org/D146211
clang/lib/CodeGen/CGExprAgg.cpp
clang/test/CodeGen/init.c
clang/test/CodeGen/label-array-aggregate-init.c