[llvm] r374009 - [LitConfig] Silenced notes/warnings on quiet.

Andrew Trick via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 7 18:31:02 PDT 2019


Author: atrick
Date: Mon Oct  7 18:31:02 2019
New Revision: 374009

URL: http://llvm.org/viewvc/llvm-project?rev=374009&view=rev
Log:
[LitConfig] Silenced notes/warnings on quiet.

Lit has a "quiet" option, -q, which is documented to "suppress no
error output". Previously, LitConfig displayed notes and warnings when
the quiet option was specified. The result was that it was not
possible to get only pertinent file/line information to be used by an
editor to jump to the location where checks were failing without
passing a number of unhelpful locations first. Here, the
implementations of LitConfig.note and LitConfig.warning are modified
to account for the quiet flag and avoid displaying if the flag has
indeed been set.

Patch by Nate Chandler

Reviewed by yln

Differential Revision: https://reviews.llvm.org/D68044

Modified:
    llvm/trunk/utils/lit/lit/LitConfig.py

Modified: llvm/trunk/utils/lit/lit/LitConfig.py
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/lit/lit/LitConfig.py?rev=374009&r1=374008&r2=374009&view=diff
==============================================================================
--- llvm/trunk/utils/lit/lit/LitConfig.py (original)
+++ llvm/trunk/utils/lit/lit/LitConfig.py Mon Oct  7 18:31:02 2019
@@ -174,10 +174,12 @@ class LitConfig(object):
                                                kind, message))
 
     def note(self, message):
-        self._write_message('note', message)
+        if not self.quiet:
+            self._write_message('note', message)
 
     def warning(self, message):
-        self._write_message('warning', message)
+        if not self.quiet:
+            self._write_message('warning', message)
         self.numWarnings += 1
 
     def error(self, message):




More information about the llvm-commits mailing list