forked from OSchip/llvm-project
[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! llvm-svn: 264064
This commit is contained in:
parent
d4f094bb2b
commit
09804e275f
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue