r264064 - [Perf-training] Using os.devnull instead of a temp file
Chris Bieneman via cfe-commits
cfe-commits at lists.llvm.org
Tue Mar 22 09:33:23 PDT 2016
Author: cbieneman
Date: Tue Mar 22 11:33:23 2016
New Revision: 264064
URL: http://llvm.org/viewvc/llvm-project?rev=264064&view=rev
Log:
[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!
Modified:
cfe/trunk/utils/perf-training/perf-helper.py
Modified: cfe/trunk/utils/perf-training/perf-helper.py
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/utils/perf-training/perf-helper.py?rev=264064&r1=264063&r2=264064&view=diff
==============================================================================
--- cfe/trunk/utils/perf-training/perf-helper.py (original)
+++ cfe/trunk/utils/perf-training/perf-helper.py Tue Mar 22 11:33:23 2016
@@ -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;
More information about the cfe-commits
mailing list