[PATCH] D140989: [DebugInfo] Update SourceLevelDebugging.rst to better explain kill locations

Stephen Tozer via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 4 09:18:23 PST 2023


StephenTozer added a comment.

Minor comments but otherwise LGTM.



================
Comment at: llvm/docs/SourceLevelDebugging.rst:540
     %g = call i32 @gazonk()
     call @llvm.dbg.value(metadata i32 undef, metadata !1, metadata !2)
     call @llvm.dbg.value(metadata i32 %g, metadata !3, metadata !2)
----------------



================
Comment at: llvm/docs/SourceLevelDebugging.rst:554-555
+* Any location operand is ``poison`` (or ``undef``).
+* Any location operand is an empty metadata tuple (``!{}``) - in practice this
+  will not occur in ``!DIArgList``s.
+* There are no location operands (empty ``DIArgList``) and the ``DIExpression``
----------------
Maybe a minor point, but "in practice" implies it is valid but just doesn't occur naturally, when it would really just be an error however it came about. Maybe "this cannot appear as part of a `!DIArgList`" or something similar.


================
Comment at: llvm/docs/SourceLevelDebugging.rst:556-557
+  will not occur in ``!DIArgList``s.
+* There are no location operands (empty ``DIArgList``) and the ``DIExpression``
+  is empty.
+
----------------
Technically the `DIExpression` doesn't have to be empty - it just has to be non-complex, i.e. it contains only `DW_OP_LLVM_tag_offset` or `DW_OP_LLVM_fragment` elements. The distinction probably isn't important here however.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D140989/new/

https://reviews.llvm.org/D140989



More information about the llvm-commits mailing list