[clang] 63aa57d - Small fixes to creduce-clang-crash.py script.

Amy Huang via cfe-commits cfe-commits at lists.llvm.org
Thu Dec 22 08:34:06 PST 2022


Author: Amy Huang
Date: 2022-12-22T16:33:28Z
New Revision: 63aa57dc57e1d47479025f65a89a5a9da974800f

URL: https://github.com/llvm/llvm-project/commit/63aa57dc57e1d47479025f65a89a5a9da974800f
DIFF: https://github.com/llvm/llvm-project/commit/63aa57dc57e1d47479025f65a89a5a9da974800f.diff

LOG: Small fixes to creduce-clang-crash.py script.

Specify python3, and replace / with // to do integer division.

Added: 
    

Modified: 
    clang/utils/creduce-clang-crash.py

Removed: 
    


################################################################################
diff  --git a/clang/utils/creduce-clang-crash.py b/clang/utils/creduce-clang-crash.py
index 08056e52b8264..77bd4cf0fbfcf 100755
--- a/clang/utils/creduce-clang-crash.py
+++ b/clang/utils/creduce-clang-crash.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 """Calls C-Reduce to create a minimal reproducer for clang crashes.
 
 Output files:
@@ -396,8 +396,8 @@ def main():
   parser.add_argument('--creduce', dest='creduce', type=str,
                       help="The path to the `creduce` executable. "
                       "Required if `creduce` is not in PATH environment.")
-  parser.add_argument('--n', dest='core_number', type=int, 
-                      default=max(4, multiprocessing.cpu_count() / 2),
+  parser.add_argument('--n', dest='core_number', type=int,
+                      default=max(4, multiprocessing.cpu_count() // 2),
                       help="Number of cores to use.")
   parser.add_argument('-v', '--verbose', action='store_true')
   args = parser.parse_args()


        


More information about the cfe-commits mailing list