[lld] [llvm] [DebugInfo][DwarfDebug] Move emission of globals from beginModule() to endModule() (5/7) (PR #184219)

Vladislav Dzhidzhoev via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 3 06:50:46 PST 2026


================
@@ -127,6 +101,29 @@ attributes #1 = { nofree nosync nounwind readnone speculatable willreturn }
 ; CHECK-EMPTY:
 ; CHECK-NEXT:   NULL
 
+!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression())
----------------
dzhidzhoev wrote:

The original test code structure looks like:
```
!Portion of debug info

// CHECK lines

!Portion of debug info

// CHECK lines

!Portion of debug info

// CHECK lines

!Portion of debug info
```

Due to this patch,  check lines order/DIEs order won't match the order of LLVM IR debug info lines anymore.
Hence, the lines were just reordered to make it look like
```
// CHECK lines
!Debug info
```

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


More information about the llvm-commits mailing list