[compiler-rt] 57edc61 - [NFC] convert compiler-rt/lib/dfsan/scripts/build-libc-list.py to python3 syntax

Tobias Hieta via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 10 01:20:57 PST 2023


Author: Tobias Hieta
Date: 2023-02-10T10:20:51+01:00
New Revision: 57edc61093d9ee54025824b1f83e19bbda24beeb

URL: https://github.com/llvm/llvm-project/commit/57edc61093d9ee54025824b1f83e19bbda24beeb
DIFF: https://github.com/llvm/llvm-project/commit/57edc61093d9ee54025824b1f83e19bbda24beeb.diff

LOG: [NFC] convert compiler-rt/lib/dfsan/scripts/build-libc-list.py to python3 syntax

I found a few Python files not using Python 3 syntax in the tree
when trying to apply reformatting to them. This was converted with
2to3 and the changes seemed sane.

Reviewed By: MaskRay, browneee

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

Added: 
    

Modified: 
    compiler-rt/lib/dfsan/scripts/build-libc-list.py

Removed: 
    


################################################################################
diff  --git a/compiler-rt/lib/dfsan/scripts/build-libc-list.py b/compiler-rt/lib/dfsan/scripts/build-libc-list.py
index 524749640e4e2..5452252c04b3a 100755
--- a/compiler-rt/lib/dfsan/scripts/build-libc-list.py
+++ b/compiler-rt/lib/dfsan/scripts/build-libc-list.py
@@ -69,7 +69,7 @@ def defined_function_list(object):
 
 libs = options.lib_file
 if not libs:
-    print >> sys.stderr, 'No libraries provided.'
+    print('No libraries provided.', file=sys.stderr)
     exit(1)
 
 missing_lib = False
@@ -79,14 +79,14 @@ def defined_function_list(object):
     functions += defined_function_list(l)
   else:
     missing_lib = True
-    print >> sys.stderr, 'warning: library %s not found' % l
+    print('warning: library %s not found' % l, file=sys.stderr)
 
 if options.error_missing_lib and missing_lib:
-    print >> sys.stderr, 'Exiting with failure code due to missing library.'
+    print('Exiting with failure code due to missing library.', file=sys.stderr)
     exit(1)
 
 functions = list(set(functions))
 functions.sort()
 
 for f in functions:
-  print 'fun:%s=uninstrumented' % f
+  print('fun:%s=uninstrumented' % f)


        


More information about the llvm-commits mailing list