summaryrefslogtreecommitdiffstats
path: root/llvm/docs/ProgrammersManual.rst
diff options
context:
space:
mode:
authorJonas Devlieghere <jonas@devlieghere.com>2017-12-25 14:16:07 +0000
committerJonas Devlieghere <jonas@devlieghere.com>2017-12-25 14:16:07 +0000
commited8d2bc5c6cf35b00e5122a5238509118a34b971 (patch)
treec910526a5d6f489b685d0f04bf3a1ce6196814f2 /llvm/docs/ProgrammersManual.rst
parent193e701d86c1b7302989efb366042ca6e802b00f (diff)
downloadbcm5719-llvm-ed8d2bc5c6cf35b00e5122a5238509118a34b971.tar.gz
bcm5719-llvm-ed8d2bc5c6cf35b00e5122a5238509118a34b971.zip
[docs] Use dbgs() instead of errs() for DEBUG()
The examples in llvm/Support/Debug.h use `DEBUG(dbgs() << ...)` instead of `errs()`, so the examples in the Programmer's Manual should match that. Patch by: Moritz Sichert <moritz.sichert@googlemail.com> Differential revision: https://reviews.llvm.org/D41170 llvm-svn: 321444
Diffstat (limited to 'llvm/docs/ProgrammersManual.rst')
-rw-r--r--llvm/docs/ProgrammersManual.rst10
1 files changed, 5 insertions, 5 deletions
diff --git a/llvm/docs/ProgrammersManual.rst b/llvm/docs/ProgrammersManual.rst
index 719d3997594..07048a52319 100644
--- a/llvm/docs/ProgrammersManual.rst
+++ b/llvm/docs/ProgrammersManual.rst
@@ -1040,7 +1040,7 @@ line argument:
.. code-block:: c++
- DEBUG(errs() << "I am here!\n");
+ DEBUG(dbgs() << "I am here!\n");
Then you can run your pass like this:
@@ -1076,10 +1076,10 @@ follows:
.. code-block:: c++
#define DEBUG_TYPE "foo"
- DEBUG(errs() << "'foo' debug type\n");
+ DEBUG(dbgs() << "'foo' debug type\n");
#undef DEBUG_TYPE
#define DEBUG_TYPE "bar"
- DEBUG(errs() << "'bar' debug type\n"));
+ DEBUG(dbgs() << "'bar' debug type\n");
#undef DEBUG_TYPE
Then you can run your pass like this:
@@ -1120,8 +1120,8 @@ preceding example could be written as:
.. code-block:: c++
- DEBUG_WITH_TYPE("foo", errs() << "'foo' debug type\n");
- DEBUG_WITH_TYPE("bar", errs() << "'bar' debug type\n"));
+ DEBUG_WITH_TYPE("foo", dbgs() << "'foo' debug type\n");
+ DEBUG_WITH_TYPE("bar", dbgs() << "'bar' debug type\n");
.. _Statistic:
OpenPOWER on IntegriCloud