[llvm] r321444 - [docs] Use dbgs() instead of errs() for DEBUG()
Jonas Devlieghere via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 25 06:16:07 PST 2017
Author: jdevlieghere
Date: Mon Dec 25 06:16:07 2017
New Revision: 321444
URL: http://llvm.org/viewvc/llvm-project?rev=321444&view=rev
Log:
[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 at googlemail.com>
Differential revision: https://reviews.llvm.org/D41170
Modified:
llvm/trunk/docs/ProgrammersManual.rst
Modified: llvm/trunk/docs/ProgrammersManual.rst
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/ProgrammersManual.rst?rev=321444&r1=321443&r2=321444&view=diff
==============================================================================
--- llvm/trunk/docs/ProgrammersManual.rst (original)
+++ llvm/trunk/docs/ProgrammersManual.rst Mon Dec 25 06:16:07 2017
@@ -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:
More information about the llvm-commits
mailing list