diff options
author | Chris Bieneman <beanz@apple.com> | 2016-03-22 16:33:23 +0000 |
---|---|---|
committer | Chris Bieneman <beanz@apple.com> | 2016-03-22 16:33:23 +0000 |
commit | 7b9ada75b9818b40e8703a3448bb0f99edfd7a51 (patch) | |
tree | 8e4bf4fce6cf8d462d7ab5d2b3947d5b0270e232 /utils/perf-training | |
parent | f4075790dc3c9e61d0ce5e03d18e7d266e945faa (diff) | |
download | clang-7b9ada75b9818b40e8703a3448bb0f99edfd7a51.tar.gz |
[Perf-training] Using os.devnull instead of a temp file
This is based on post-commit feedback from Vedant. Totally didn't know that existed and worked on Windows.
Thanks Vedant!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@264064 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/perf-training')
-rw-r--r-- | utils/perf-training/perf-helper.py | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/utils/perf-training/perf-helper.py b/utils/perf-training/perf-helper.py index 5d1c03332d..cbc31319f0 100644 --- a/utils/perf-training/perf-helper.py +++ b/utils/perf-training/perf-helper.py @@ -152,12 +152,9 @@ def cc1(args): # clear the profile file env, so that we don't generate profdata # when capturing the cc1 command - handle, profraw_file = tempfile.mkstemp() - os.close(handle) cc1_env = test_env - cc1_env["LLVM_PROFILE_FILE"] = profraw_file + cc1_env["LLVM_PROFILE_FILE"] = os.devnull cc1_cmd = get_cc1_command_for_args(cmd, cc1_env) - os.remove(profraw_file) subprocess.check_call(cc1_cmd) return 0; |