llvm/SOURCES/0001-docs-Convert-remaining-command-guide-entries-from-md.patch
2021-10-08 13:25:07 +00:00

249 lines
7.4 KiB
Diff
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

From e4e77bb8bf741f52b43b90987646f1c118914848 Mon Sep 17 00:00:00 2001
From: Jordan Rupprecht <rupprecht@google.com>
Date: Wed, 21 Aug 2019 18:00:17 +0000
Subject: [PATCH] [docs] Convert remaining command guide entries from md to
rst.
Summary:
Linking between markdown and rst files is currently not supported very well, e.g. the current llvm-addr2line docs [1] link to "llvm-symbolizer" instead of "llvm-symbolizer.html". This is weirdly broken in different ways depending on which versions of sphinx and recommonmark are being used, so workaround the bug by using rst everywhere.
[1] http://llvm.org/docs/CommandGuide/llvm-addr2line.html
Reviewers: jhenderson
Reviewed By: jhenderson
Subscribers: lebedev.ri, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D66305
llvm-svn: 369553
---
llvm/docs/CommandGuide/llvm-addr2line.md | 28 -----------------------
llvm/docs/CommandGuide/llvm-addr2line.rst | 38 +++++++++++++++++++++++++++++++
llvm/docs/CommandGuide/llvm-ranlib.md | 17 --------------
llvm/docs/CommandGuide/llvm-ranlib.rst | 23 +++++++++++++++++++
llvm/docs/CommandGuide/llvm-size.md | 10 --------
llvm/docs/CommandGuide/llvm-size.rst | 15 ++++++++++++
llvm/docs/CommandGuide/llvm-strings.md | 10 --------
llvm/docs/CommandGuide/llvm-strings.rst | 15 ++++++++++++
8 files changed, 91 insertions(+), 65 deletions(-)
delete mode 100644 llvm/docs/CommandGuide/llvm-addr2line.md
create mode 100644 llvm/docs/CommandGuide/llvm-addr2line.rst
delete mode 100644 llvm/docs/CommandGuide/llvm-ranlib.md
create mode 100644 llvm/docs/CommandGuide/llvm-ranlib.rst
delete mode 100644 llvm/docs/CommandGuide/llvm-size.md
create mode 100644 llvm/docs/CommandGuide/llvm-size.rst
delete mode 100644 llvm/docs/CommandGuide/llvm-strings.md
create mode 100644 llvm/docs/CommandGuide/llvm-strings.rst
diff --git a/llvm/docs/CommandGuide/llvm-addr2line.md b/llvm/docs/CommandGuide/llvm-addr2line.md
deleted file mode 100644
index 03224c4..0000000
--- a/llvm/docs/CommandGuide/llvm-addr2line.md
+++ /dev/null
@@ -1,28 +0,0 @@
-# llvm-addr2line - a drop-in replacement for addr2line
-
-## SYNOPSIS
-
-**llvm-addr2line** [*options*]
-
-## DESCRIPTION
-
-**llvm-addr2line** is an alias for the [llvm-symbolizer](llvm-symbolizer) tool
-with different defaults. The goal is to make it a drop-in replacement for
-GNU's **addr2line**.
-
-Here are some of those differences:
-
-* Defaults not to print function names. Use [-f](llvm-symbolizer-opt-f)
- to enable that.
-
-* Defaults not to demangle function names. Use [-C](llvm-symbolizer-opt-C)
- to switch the demangling on.
-
-* Defaults not to print inlined frames. Use [-i](llvm-symbolizer-opt-i)
- to show inlined frames for a source code location in an inlined function.
-
-* Uses [--output-style=GNU](llvm-symbolizer-opt-output-style) by default.
-
-## SEE ALSO
-
-Refer to [llvm-symbolizer](llvm-symbolizer) for additional information.
diff --git a/llvm/docs/CommandGuide/llvm-addr2line.rst b/llvm/docs/CommandGuide/llvm-addr2line.rst
new file mode 100644
index 0000000..08f1b69
--- /dev/null
+++ b/llvm/docs/CommandGuide/llvm-addr2line.rst
@@ -0,0 +1,38 @@
+llvm-addr2line - a drop-in replacement for addr2line
+====================================================
+
+.. program:: llvm-addr2line
+
+SYNOPSIS
+--------
+
+:program:`llvm-addr2line` [*options*]
+
+DESCRIPTION
+-----------
+
+:program:`llvm-addr2line` is an alias for the :manpage:`llvm-symbolizer(1)`
+tool with different defaults. The goal is to make it a drop-in replacement for
+GNU's :program:`addr2line`.
+
+Here are some of those differences:
+
+- Defaults not to print function names. Use `-f`_ to enable that.
+
+- Defaults not to demangle function names. Use `-C`_ to switch the
+ demangling on.
+
+- Defaults not to print inlined frames. Use `-i`_ to show inlined
+ frames for a source code location in an inlined function.
+
+- Uses `--output-style=GNU`_ by default.
+
+SEE ALSO
+--------
+
+:manpage:`llvm-symbolizer(1)`
+
+.. _-f: llvm-symbolizer.html#llvm-symbolizer-opt-f
+.. _-C: llvm-symbolizer.html#llvm-symbolizer-opt-c
+.. _-i: llvm-symbolizer.html#llvm-symbolizer-opt-i
+.. _--output-style=GNU: llvm-symbolizer.html#llvm-symbolizer-opt-output-style
diff --git a/llvm/docs/CommandGuide/llvm-ranlib.md b/llvm/docs/CommandGuide/llvm-ranlib.md
deleted file mode 100644
index 4377364..0000000
--- a/llvm/docs/CommandGuide/llvm-ranlib.md
+++ /dev/null
@@ -1,17 +0,0 @@
-# llvm-ranlib - generates an archive index
-
-## SYNOPSIS
-
-**llvm-ranlib** [*options*]
-
-## DESCRIPTION
-
-**llvm-ranlib** is an alias for the [llvm-ar](llvm-ar.html) tool that generates
-an index for an archive. It can be used as a replacement for GNU's **ranlib**
-tool.
-
-Running **llvm-ranlib** is equivalent to running **llvm-ar s**.
-
-## SEE ALSO
-
-Refer to [llvm-ar](llvm-ar.html) for additional information.
diff --git a/llvm/docs/CommandGuide/llvm-ranlib.rst b/llvm/docs/CommandGuide/llvm-ranlib.rst
new file mode 100644
index 0000000..314a330
--- /dev/null
+++ b/llvm/docs/CommandGuide/llvm-ranlib.rst
@@ -0,0 +1,23 @@
+llvm-ranlib - generates an archive index
+========================================
+
+.. program:: llvm-ranlib
+
+SYNOPSIS
+--------
+
+:program:`llvm-ranlib` [*options*]
+
+DESCRIPTION
+-----------
+
+:program:`llvm-ranlib` is an alias for the :doc:`llvm-ar <llvm-ar>` tool that
+generates an index for an archive. It can be used as a replacement for GNUs
+:program:`ranlib` tool.
+
+Running :program:`llvm-ranlib` is equivalent to running ``llvm-ar s``.
+
+SEE ALSO
+--------
+
+:manpage:`llvm-ar(1)`
diff --git a/llvm/docs/CommandGuide/llvm-size.md b/llvm/docs/CommandGuide/llvm-size.md
deleted file mode 100644
index 3952708..0000000
--- a/llvm/docs/CommandGuide/llvm-size.md
+++ /dev/null
@@ -1,10 +0,0 @@
-# llvm-size - print segment sizes
-
-## SYNOPSIS
-
-**llvm-size** [*options*]
-
-## DESCRIPTION
-
-**llvm-size** is a tool that prints segment sizes in object files. The goal is
-to make it a drop-in replacement for GNU's **size**.
diff --git a/llvm/docs/CommandGuide/llvm-size.rst b/llvm/docs/CommandGuide/llvm-size.rst
new file mode 100644
index 0000000..0dce15c
--- /dev/null
+++ b/llvm/docs/CommandGuide/llvm-size.rst
@@ -0,0 +1,15 @@
+llvm-size - print size information
+==================================
+
+.. program:: llvm-size
+
+SYNOPSIS
+--------
+
+:program:`llvm-size` [*options*]
+
+DESCRIPTION
+-----------
+
+:program:`llvm-size` is a tool that prints size information for object files.
+The goal is to make it a drop-in replacement for GNUs :program:`size`.
diff --git a/llvm/docs/CommandGuide/llvm-strings.md b/llvm/docs/CommandGuide/llvm-strings.md
deleted file mode 100644
index b5871c4..0000000
--- a/llvm/docs/CommandGuide/llvm-strings.md
+++ /dev/null
@@ -1,10 +0,0 @@
-# llvm-strings - print strings
-
-## SYNOPSIS
-
-**llvm-strings** [*options*]
-
-## DESCRIPTION
-
-**llvm-strings** is a tool that prints strings in object files. The goal is to
-make it a drop-in replacement for GNU's **size**.
diff --git a/llvm/docs/CommandGuide/llvm-strings.rst b/llvm/docs/CommandGuide/llvm-strings.rst
new file mode 100644
index 0000000..d8ab9cb
--- /dev/null
+++ b/llvm/docs/CommandGuide/llvm-strings.rst
@@ -0,0 +1,15 @@
+llvm-strings - print strings
+============================
+
+.. program:: llvm-strings
+
+SYNOPSIS
+--------
+
+:program:`llvm-strings` [*options*]
+
+DESCRIPTION
+-----------
+
+:program:`llvm-strings` is a tool that prints strings in files. The goal is to
+make it a drop-in replacement for GNUs :program:`strings`.
--
1.8.3.1