Michael137 wrote: > Do we end up with two DIGlobalVariableExpressions?
Just checked. With this patch, MergeGlobals would produce following IR: ``` ... !10 = !DIGlobalVariableExpression(var: !11, expr: !DIExpression(DW_OP_plus_uconst, 4, DW_OP_constu, 200, DW_OP_stack_value)) !11 = distinct !DIGlobalVariable(name: "b", linkageName: "_ZN12_GLOBAL__N_13Foo1bE", scope: !2, file: !3, line: 8, type: !4, isLocal: true, isDefinition: true, declaration: !9) ... !14 = !DIGlobalVariableExpression(var: !11, expr: !DIExpression(DW_OP_constu, 200, DW_OP_stack_value)) ... ``` I.e., two `DIGlobalVariableExpression`s for the same `DIGlobalVariable`, which AFAICT would confuse `DwarfDebug` at the moment, which expects there to be a 1-to-1 mapping. https://github.com/llvm/llvm-project/pull/72730 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits