@@ -4511,13 +4511,36 @@ DIGlobalVariable
4511
4511
4512
4512
.. code-block:: text
4513
4513
4514
- !0 = !DIGlobalVariable(name: "foo", linkageName: "foo", scope: !1,
4515
- file: !2, line: 7, type: !3, isLocal: true,
4516
- isDefinition: false, variable: i32* @foo,
4517
- declaration: !4)
4514
+ @foo = global i32, !dbg !0
4515
+ !0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression())
4516
+ !1 = !DIGlobalVariable(name: "foo", linkageName: "foo", scope: !2,
4517
+ file: !3, line: 7, type: !4, isLocal: true,
4518
+ isDefinition: false, declaration: !5)
4518
4519
4519
- All global variables should be referenced by the `globals:` field of a
4520
- :ref:`compile unit <DICompileUnit>`.
4520
+
4521
+ DIGlobalVariableExpression
4522
+ """"""""""""""""""""""""""
4523
+
4524
+ ``DIGlobalVariableExpression`` nodes tie a :ref:`DIGlobalVariable` together
4525
+ with a :ref:`DIExpression`.
4526
+
4527
+ .. code-block:: text
4528
+
4529
+ @lower = global i32, !dbg !0
4530
+ @upper = global i32, !dbg !1
4531
+ !0 = !DIGlobalVariableExpression(
4532
+ var: !2,
4533
+ expr: !DIExpression(DW_OP_LLVM_fragment, 0, 32)
4534
+ )
4535
+ !1 = !DIGlobalVariableExpression(
4536
+ var: !2,
4537
+ expr: !DIExpression(DW_OP_LLVM_fragment, 32, 32)
4538
+ )
4539
+ !2 = !DIGlobalVariable(name: "split64", linkageName: "split64", scope: !3,
4540
+ file: !4, line: 8, type: !5, declaration: !6)
4541
+
4542
+ All global variable expressions should be referenced by the `globals:` field of
4543
+ a :ref:`compile unit <DICompileUnit>`.
4521
4544
4522
4545
.. _DISubprogram:
4523
4546
0 commit comments