[llvm] [AMDGPU] Poison invalid globals after emitting error in LowerBufferFatPointers pass (PR #184662)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 4 11:07:43 PST 2026


================
@@ -2467,11 +2468,19 @@ bool AMDGPULowerBufferFatPointers::run(Module &M, const TargetMachine &TM) {
 
   BufferFatPtrToStructTypeMap StructTM(DL);
   BufferFatPtrToIntTypeMap IntTM(DL);
-  for (const GlobalVariable &GV : M.globals()) {
+
+  auto EraseInvalidGlobal = [&Changed](GlobalVariable &GV) {
----------------
arsenm wrote:

I wouldn't bother with the lambda and just inline it in both places 

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


More information about the llvm-commits mailing list