[clang] [C++20] [Modules] Don't mark variables from other modules as constant if its initializer is not constant (PR #93530)

Eli Friedman via cfe-commits cfe-commits at lists.llvm.org
Tue May 28 11:39:30 PDT 2024


https://github.com/efriedma-quic commented:

I think if a variable is GVA_AvailableExternally, and we can't emit a constant, we should just completely skip emitting the definition: there isn't any point to emitting an available_externally definition that doesn't actually contain any information the optimizer can use.

Not sure off the top of my head where that check belongs; might be okay to just stick it into EmitGlobalVarDefinition itself.

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


More information about the cfe-commits mailing list