[PATCH] D60572: creduce-clang-crash: Use `!` instead of `not`
Nico Weber via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Apr 11 11:11:43 PDT 2019
thakis created this revision.
thakis added a reviewer: akhuang.
The run script runs in bash, so no need to depend on llvm's `not` binary.
https://reviews.llvm.org/D60572
Files:
clang/utils/creduce-clang-crash.py
Index: clang/utils/creduce-clang-crash.py
===================================================================
--- clang/utils/creduce-clang-crash.py
+++ clang/utils/creduce-clang-crash.py
@@ -23,7 +23,6 @@
verbose = False
creduce_cmd = None
clang_cmd = None
-not_cmd = None
def verbose_print(*args, **kwargs):
if verbose:
@@ -178,8 +177,8 @@
crash_flag = "--crash" if self.is_crash else ""
- output = "#!/bin/bash\n%s %s %s >& t.log || exit 1\n" % \
- (pipes.quote(not_cmd), crash_flag, quote_cmd(self.get_crash_cmd()))
+ output = "#!/bin/bash\n! %s %s >& t.log || exit 1\n" % \
+ (crash_flag, quote_cmd(self.get_crash_cmd()))
for msg in self.expected_output:
output += 'grep %s t.log || exit 1\n' % pipes.quote(msg)
@@ -360,7 +359,6 @@
global verbose
global creduce_cmd
global clang_cmd
- global not_cmd
parser = ArgumentParser(description=__doc__,
formatter_class=RawTextHelpFormatter)
@@ -370,9 +368,6 @@
help="Name of the file to be reduced.")
parser.add_argument('--llvm-bin', dest='llvm_bin', type=str,
help="Path to the LLVM bin directory.")
- parser.add_argument('--llvm-not', dest='llvm_not', type=str,
- help="The path to the `not` executable. "
- "By default uses the llvm-bin directory.")
parser.add_argument('--clang', dest='clang', type=str,
help="The path to the `clang` executable. "
"By default uses the llvm-bin directory.")
@@ -386,7 +381,6 @@
llvm_bin = os.path.abspath(args.llvm_bin) if args.llvm_bin else None
creduce_cmd = check_cmd('creduce', None, args.creduce)
clang_cmd = check_cmd('clang', llvm_bin, args.clang)
- not_cmd = check_cmd('not', llvm_bin, args.llvm_not)
crash_script = check_file(args.crash_script[0])
file_to_reduce = check_file(args.file_to_reduce[0])
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D60572.194721.patch
Type: text/x-patch
Size: 1947 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190411/6c1725d8/attachment.bin>
More information about the cfe-commits
mailing list