[PATCH] D66526: WIP: [utils] Add the llvm-locstats tool
Vedant Kumar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 21 09:39:00 PDT 2019
vsk added a comment.
I really like this approach. Thanks for doing this!
================
Comment at: llvm/utils/llvm-locstats/llvm-locstats.py:107
+ # Get the llvm-dwarfdump --statistics and write it into the temproary file.
+ tmp_stats_file = 'stats.json'
+ run_command = \
----------------
Please use subprocess.call or Popen along with PIPE to avoid round-tripping to the filesystem, leaving stale files around by accident, etc.
================
Comment at: llvm/utils/llvm-locstats/llvm-locstats.py:109
+ run_command = \
+ wd + '/llvm-dwarfdump --statistics ' \
+ + binary + ' > ' + tmp_stats_file
----------------
Please use os.path.join to support Windows.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D66526/new/
https://reviews.llvm.org/D66526
More information about the llvm-commits
mailing list