summaryrefslogtreecommitdiffstats
path: root/llvm/docs
diff options
context:
space:
mode:
authorAlexander Kornienko <alexfh@google.com>2013-05-10 17:15:51 +0000
committerAlexander Kornienko <alexfh@google.com>2013-05-10 17:15:51 +0000
commit72a196a159b28f26f84d9afec8b2baac11d367bc (patch)
tree1ba076ac83be2e098ca9204902c9cd16c410cf7e /llvm/docs
parent757fbb0b144114810af70ee69972a2bf302873cd (diff)
downloadbcm5719-llvm-72a196a159b28f26f84d9afec8b2baac11d367bc.tar.gz
bcm5719-llvm-72a196a159b28f26f84d9afec8b2baac11d367bc.zip
Better output for long help strings for command-line options.
Summary: This patch allows using \n inside long help strings for command-line options, so that all lines are equally indented. This is not a perfect solution, as we don't (and probably don't want to) know about terminal width, but it allows to format long help strings somehow readable without manually padding them with spaces. A motivating example is -help output from clang-format (source code in tools/clang-format/ClangFormat.cpp, see cl options offset, length, style, and dump-config). Reviewers: atrick, alexfh Reviewed By: alexfh CC: llvm-commits, rafael Differential Revision: http://llvm-reviews.chandlerc.com/D779 llvm-svn: 181608
Diffstat (limited to 'llvm/docs')
-rw-r--r--llvm/docs/CommandLine.rst3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/docs/CommandLine.rst b/llvm/docs/CommandLine.rst
index 9b77a989082..65355518448 100644
--- a/llvm/docs/CommandLine.rst
+++ b/llvm/docs/CommandLine.rst
@@ -930,7 +930,8 @@ This section describes the basic attributes that you can specify on options.
.. _cl::desc(...):
* The **cl::desc** attribute specifies a description for the option to be
- shown in the ``-help`` output for the program.
+ shown in the ``-help`` output for the program. This attribute supports
+ multi-line descriptions with lines separated by '\n'.
.. _cl::value_desc:
OpenPOWER on IntegriCloud