Currently HIP toolchain uses Driver::GetTemporaryDirectory to
create a temporary directory for some temporary files during
compilation. The temporary directories are not automatically
deleted after compilation. This slows down compilation
on Windows.
Switch to use GetTemporaryPath which only creates temporay
files which will be deleted automatically.
Keep the original input file name convention for Darwin host
toolchain since it is needed for deterministic binary
(https://reviews.llvm.org/D111269)
The comment should probably be updated to reflect the effect of the optional arguments.