[SystemZ][z/OS] JSON file should be text files

This patch sets the OF_Text flag correctly for the json file created in Clang::DumpCompilationDatabaseFragmentToDir.

Reviewed By: amccarth

Differential Revision: https://reviews.llvm.org/D99200
This commit is contained in:
Abhina Sreeskantharajan 2021-03-24 13:27:53 -04:00
parent 3b52c04e82
commit 0bf833f670
1 changed files with 2 additions and 1 deletions

View File

@ -2336,7 +2336,8 @@ void Clang::DumpCompilationDatabaseFragmentToDir(
Twine(llvm::sys::path::filename(Input.getFilename())) + ".%%%%.json");
int FD;
SmallString<256> TempPath;
Err = llvm::sys::fs::createUniqueFile(Path, FD, TempPath);
Err = llvm::sys::fs::createUniqueFile(Path, FD, TempPath,
llvm::sys::fs::OF_Text);
if (Err) {
Driver.Diag(diag::err_drv_compilationdatabase) << Path << Err.message();
return;