[PATCH] D66526: WIP: [utils] Add the llvm-locstats tool

Orlando Cazalet-Hyams via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 22 03:06:46 PDT 2019


Orlando added inline comments.


================
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 = \
----------------
vsk wrote:
> Please use subprocess.call or Popen along with PIPE to avoid round-tripping to the filesystem, leaving stale files around by accident, etc.
Would it be worth using `tempfile.NamedTemporaryFile`  instead of hard coding the temporary file name here?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D66526/new/

https://reviews.llvm.org/D66526





More information about the llvm-commits mailing list