[SystemZ][z/OS] Pass OpenFlags when creating tmp files
authorAbhina Sreeskantharajan <Abhina.Sreeskantharajan@ibm.com>
Tue, 8 Jun 2021 18:44:45 +0000 (14:44 -0400)
committerAbhina Sreeskantharajan <Abhina.Sreeskantharajan@ibm.com>
Tue, 8 Jun 2021 18:45:34 +0000 (14:45 -0400)
commit0e8506debae3ad534b4eecfa922fc6281506a635
tree05ece4775181293c0f994381f2702e6fe073d9f0
parent31a9659de550b25b6bc0ad5cab73d133095c351f
[SystemZ][z/OS] Pass OpenFlags when creating tmp files

This patch https://reviews.llvm.org/D102876 caused some lit regressions on z/OS because tmp files were no longer being opened based on binary/text mode. This patch passes OpenFlags when creating tmp files so we can open files in different modes.

Reviewed By: amccarth

Differential Revision: https://reviews.llvm.org/D103806
clang/lib/Frontend/CompilerInstance.cpp
llvm/include/llvm/Support/FileSystem.h
llvm/lib/Support/Path.cpp