[all-commits] [llvm/llvm-project] 954e5e: [CIR] Upstream global variable replacement (#184686)
Andy Kaylor via All-commits
all-commits at lists.llvm.org
Wed Mar 4 13:51:16 PST 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 954e5e7aa2e23d315a13fc052807d6600b182341
https://github.com/llvm/llvm-project/commit/954e5e7aa2e23d315a13fc052807d6600b182341
Author: Andy Kaylor <akaylor at nvidia.com>
Date: 2026-03-04 (Wed, 04 Mar 2026)
Changed paths:
M clang/lib/CIR/CodeGen/CIRGenModule.cpp
M clang/lib/CIR/CodeGen/CIRGenModule.h
A clang/test/CIR/CodeGen/replace-global.cpp
Log Message:
-----------
[CIR] Upstream global variable replacement (#184686)
This change upstreams the CIR implementation of global variable
replacement. When we get a call to get or create a global variable using
a type that does not match the previous type for a variable of the same
name, we need to replace the old definition with the new one. In classic
codegen that was as simple as replaceAllUses+eraseFromParent, but in CIR
because we have typed pointers, we need to visit the uses and update
them with bitcasts to reflect the new type.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list