diff options
| author | Eric Fiselier <eric@efcs.ca> | 2019-02-10 04:48:54 +0000 |
|---|---|---|
| committer | Eric Fiselier <eric@efcs.ca> | 2019-02-10 04:48:54 +0000 |
| commit | 609d676aab5a04a1f53992e73f7ca52f7ea589ff (patch) | |
| tree | 7a73e45e0088f7f2e64fae1913c6a94b3aaf6c69 /libcxx/utils | |
| parent | 17f93313392d56729a4d7f44d9ae9c69285b8e20 (diff) | |
| download | bcm5719-llvm-609d676aab5a04a1f53992e73f7ca52f7ea589ff.tar.gz bcm5719-llvm-609d676aab5a04a1f53992e73f7ca52f7ea589ff.zip | |
Format sym_extract.py output to minimize diff output.
Different versions of python print dictionaries in different orders.
This can mess up diffs when updating ABI lists. This patch uses
pprint.pformat to print the dicts to get a consistent ordering.
llvm-svn: 353634
Diffstat (limited to 'libcxx/utils')
| -rw-r--r-- | libcxx/utils/libcxx/sym_check/util.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libcxx/utils/libcxx/sym_check/util.py b/libcxx/utils/libcxx/sym_check/util.py index c6f7e90f393..634e7684ca4 100644 --- a/libcxx/utils/libcxx/sym_check/util.py +++ b/libcxx/utils/libcxx/sym_check/util.py @@ -11,6 +11,7 @@ import distutils.spawn import sys import re import libcxx.util +from pprint import pformat def read_syms_from_list(slist): @@ -48,7 +49,8 @@ def write_syms(sym_list, out=None, names_only=False): if names_only: out_list = [sym['name'] for sym in sym_list] for sym in out_list: - out_str += '%s\n' % sym + # Use pformat for consistent ordering of keys. + out_str += pformat(sym, width=100000) + '\n' if out is None: sys.stdout.write(out_str) else: |

