[clang] [RFC] [clang] [CodeGen] Avoid creating global variable repeatedly when type are not specified (PR #114948)
Chuanqi Xu via cfe-commits
cfe-commits at lists.llvm.org
Tue Nov 5 17:53:08 PST 2024
ChuanqiXu9 wrote:
> I think it's reasonable to do something similar here, but I believe the change for that should be inside GetOrCreateLLVMGlobal, not in GetAddrOfGlobalVar.
The problem to make it in `GetOrCreateLLVMGlobal` is that the argument of `Ty` is not skippable. So the semantics is slightly odd. Currently I feel it makes more or less sense that we can do some decisions if the user of `GetAddrOfGlobalVar` don't specify a Type, which implies the user doesn't care about the type.
https://github.com/llvm/llvm-project/pull/114948
More information about the cfe-commits
mailing list