Skip to content
Snippets Groups Projects
Commit 7b9ada75 authored by Chris Bieneman's avatar Chris Bieneman
Browse files

[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
parent f4075790
No related branches found
No related tags found
No related merge requests found
...@@ -152,12 +152,9 @@ def cc1(args): ...@@ -152,12 +152,9 @@ def cc1(args):
# clear the profile file env, so that we don't generate profdata # clear the profile file env, so that we don't generate profdata
# when capturing the cc1 command # when capturing the cc1 command
handle, profraw_file = tempfile.mkstemp()
os.close(handle)
cc1_env = test_env 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) cc1_cmd = get_cc1_command_for_args(cmd, cc1_env)
os.remove(profraw_file)
subprocess.check_call(cc1_cmd) subprocess.check_call(cc1_cmd)
return 0; return 0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment