[PATCH] D89493: [lit] Implement `not` as a builtin in the Lit internal shell

Dan Liew via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 23 22:21:56 PDT 2021


delcypher added a comment.

LGTM other than my nits.

I'm adding @yln as reviewer just in case he has thoughts on this change.



================
Comment at: llvm/utils/lit/lit/builtin_commands/not.py:16
+For example:
+    $ not.py echo hello
+    $ echo $?
----------------
Minor nit: `echo` probably isn't a good example here as it's usually a shell builtin so it's not something that this script can actually invoke.


================
Comment at: llvm/utils/lit/lit/builtin_commands/not.py:33
+    if found is None:
+        sys.stderr.write('Failed to find program {}\n'.format(prog))
+    return found
----------------
Do we need to call `sys.stderr.flush()` here? I recently ran into a problem with `sys.stdout` where I needed to do this to ensure it gets written out but I'm not sure about stderr.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D89493/new/

https://reviews.llvm.org/D89493



More information about the llvm-commits mailing list