[compiler-rt] e7ade78 - [dfsan] Fix some build-libc-list.py lint issues
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 10 16:48:39 PST 2023
Author: Fangrui Song
Date: 2023-02-10T16:48:34-08:00
New Revision: e7ade78a8ceb6da9f2a9bd9f804942ad11549d6e
URL: https://github.com/llvm/llvm-project/commit/e7ade78a8ceb6da9f2a9bd9f804942ad11549d6e
DIFF: https://github.com/llvm/llvm-project/commit/e7ade78a8ceb6da9f2a9bd9f804942ad11549d6e.diff
LOG: [dfsan] Fix some build-libc-list.py lint issues
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 a90649d1c293..aa155b24cb4a 100755
--- a/compiler-rt/lib/dfsan/scripts/build-libc-list.py
+++ b/compiler-rt/lib/dfsan/scripts/build-libc-list.py
@@ -40,9 +40,11 @@
import sys
from optparse import OptionParser
-def defined_function_list(object):
+
+def defined_function_list(lib):
+ """Get non-local function symbols from lib."""
functions = []
- readelf_proc = subprocess.Popen(['readelf', '-s', '-W', object],
+ readelf_proc = subprocess.Popen(['readelf', '-s', '-W', lib],
stdout=subprocess.PIPE)
readelf = readelf_proc.communicate()[0].decode().split('\n')
if readelf_proc.returncode != 0:
@@ -85,8 +87,5 @@ def defined_function_list(object):
print('Exiting with failure code due to missing library.', file=sys.stderr)
exit(1)
-functions = list(set(functions))
-functions.sort()
-
-for f in functions:
+for f in sorted(set(functions)):
print('fun:%s=uninstrumented' % f)
More information about the llvm-commits
mailing list