[PATCH] D68044: [LitConfig] Silenced notes/warnings on quiet.

Nate Chandler via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 25 11:58:11 PDT 2019


nate_chandler created this revision.
nate_chandler added reviewers: jordan_rose, gottesmm.
Herald added subscribers: llvm-commits, delcypher.
Herald added a project: LLVM.

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.


Repository:
  rL LLVM

https://reviews.llvm.org/D68044

Files:
  utils/lit/lit/LitConfig.py


Index: utils/lit/lit/LitConfig.py
===================================================================
--- utils/lit/lit/LitConfig.py
+++ utils/lit/lit/LitConfig.py
@@ -164,10 +164,12 @@
                                                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):


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D68044.221815.patch
Type: text/x-patch
Size: 635 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190925/56df5a40/attachment.bin>


More information about the llvm-commits mailing list