Add a --check-graph option to llvmc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61989 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/tools/llvmc/doc/LLVMC-Reference.rst b/tools/llvmc/doc/LLVMC-Reference.rst
index 6189ec2..1c0da18 100644
--- a/tools/llvmc/doc/LLVMC-Reference.rst
+++ b/tools/llvmc/doc/LLVMC-Reference.rst
@@ -92,6 +92,10 @@
* ``-v`` - Enable verbose mode, i.e. print out all executed commands.
+* ``--check-graph`` - Check the compilation for common errors like
+ mismatched output/input language names, multiple default edges and
+ cycles. Hidden option, useful for debugging.
+
* ``--view-graph`` - Show a graphical representation of the compilation
graph. Requires that you have ``dot`` and ``gv`` programs
installed. Hidden option, useful for debugging.
@@ -605,6 +609,14 @@
creates a Graphviz source file (``compilation-graph.dot``) in the
current directory.
+Another useful option is ``--check-graph``. It checks the compilation
+graph for common errors like mismatched output/input language names,
+multiple default edges and cycles. These checks can't be performed at
+compile-time because the plugins can load code dynamically. When
+invoked with ``--check-graph``, ``llvmc`` doesn't perform any
+compilation tasks and returns the number of encountered errors as its
+status code.
+
.. _Graphviz: http://www.graphviz.org/
.. _Ghostview: http://pages.cs.wisc.edu/~ghost/