Skip to content
This repository has been archived by the owner on May 21, 2019. It is now read-only.

Commit

Permalink
Fix gen_dynamic_list.py for Python 3. Patch by Marcoen Hirschberg.
Browse files Browse the repository at this point in the history
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@197493 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
Alexey Samsonov committed Dec 17, 2013
1 parent 6bd601b commit d27ef48
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/sanitizer_common/scripts/gen_dynamic_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def get_global_functions(library):
functions = []
nm_proc = subprocess.Popen(['nm', library], stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
nm_out = nm_proc.communicate()[0].split('\n')
nm_out = nm_proc.communicate()[0].decode().split('\n')
if nm_proc.returncode != 0:
raise subprocess.CalledProcessError(nm_proc.returncode, 'nm')
for line in nm_out:
Expand Down Expand Up @@ -75,11 +75,11 @@ def main(argv):
for line in f:
result.append(line.rstrip())
# Print the resulting list in the format recognized by ld.
print '{'
print('{')
result.sort()
for f in result:
print ' ' + f + ';'
print '};'
print(' ' + f + ';')
print('};')

if __name__ == '__main__':
main(sys.argv)

0 comments on commit d27ef48

Please sign in to comment.