[PATCH] D126767: [DebugInfo][Docs] Improve code formatting in instruction referencing doc

Orlando Cazalet-Hyams via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 7 02:02:45 PDT 2022


Orlando added a comment.

Hi @jryans, thanks for this update. I'm not particularly familiar with reStructuredText formatting so I've just been looking at an existing doc (https://github.com/llvm/llvm-project/blob/main/llvm/docs/LangRef.rst) to guide my review.



================
Comment at: llvm/docs/InstrRefDebugInfo.md:25
 
-  %2 = add i32 %0, %1
-  call void @llvm.dbg.value(metadata i32 %2,
+```llvm
+%2 = add i32 %0, %1
----------------
I'm not particularly familiar with reStructuredText formatting at all - do triple backticks format a code block? I can't see them used in https://github.com/llvm/llvm-project/blob/main/llvm/docs/LangRef.rst. It looks like that document uses `.. code-block::`, as in:
```
.. code-block:: llvm

%2 = add i32 %0, %1
call void @llvm.dbg.value(metadata i32 %2,
```


================
Comment at: llvm/docs/InstrRefDebugInfo.md:48
+defined: independently of which register is defined by that `MachineOperand`. In
+the code above, the `DBG_INSTR_REF` instruction refers to instruction number
+one, operand zero, while the `ADD32rr` has a `debug-instr-number` attribute
----------------
It looks like double backticks (rather than single) are used to format code inline in reStructuredText.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D126767



More information about the llvm-commits mailing list