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
This commit is contained in:
Eric Fiselier 2019-02-10 04:48:54 +00:00
parent 17f9331339
commit 609d676aab
4 changed files with 6545 additions and 6543 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -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: