[clang] [CIR] Keep CIR global types visible across lowering replacements (PR #238698)

Henrich Lauko via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 4 01:07:22 PST 2026


https://github.com/xlauko commented:

A few places outside the diff:

- https://github.com/llvm/llvm-project/blob/3a765161946a23043a549e1f3e0f4fe36e825940/clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVM.cpp#L3542: the global alias path skips the symbol-table remove/insert that the other replacements now do. Without rollback, the cached table would point to the erased `cir.global`.
- https://github.com/llvm/llvm-project/blob/3a765161946a23043a549e1f3e0f4fe36e825940/clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVM.cpp#L3170: same problem for function aliases.
- https://github.com/llvm/llvm-project/blob/3a765161946a23043a549e1f3e0f4fe36e825940/clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVM.cpp#L5389: `getValueForVTableSymbol` still reads `llvmSymbol.getType()`. Should it use the pre-conversion type too, like `getAddressOfSymbol`?

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


More information about the cfe-commits mailing list