[PATCH] D145369: Emit const globals with constexpr destructor as constant LLVM values
Hans Wennborg via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Mar 16 03:30:32 PDT 2023
hans added inline comments.
================
Comment at: clang/lib/CodeGen/CGExprAgg.cpp:535
CGM.getModule(), C->getType(),
- CGM.isTypeConstant(ArrayQTy, /* ExcludeCtorDtor= */ true),
+ CGM.isTypeConstant(ArrayQTy, /* ExcludeCtor= */ true,
+ /* ExcludeDtor= */ false),
----------------
efriedma wrote:
> I'm not sure why we're querying isTypeConstant here? The global shouldn't get written to in any case. But I guess that's a separate issue.
Yeah, it seems safe to always make the global const. Doing that here: https://reviews.llvm.org/D146211
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D145369/new/
https://reviews.llvm.org/D145369
More information about the cfe-commits
mailing list