Skip to content
Snippets Groups Projects
Commit 38d7c34f authored by Rafael Espindola's avatar Rafael Espindola
Browse files

Fix PR16547.

We should not be asking unique_file to prepend the system temporary directory
when creating the html report. Unfortunately I don't think we can test this
with the current infrastructure since unique_file ignores MakeAbsolute if the
directory is already absolute and the paths provided by lit are.

I will take a quick look at making this api a bit less error prone.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185707 91177308-0d34-0410-b5e6-96231b3b80d8
parent abab1837
No related branches found
No related tags found
No related merge requests found
...@@ -247,8 +247,9 @@ void HTMLDiagnostics::ReportDiag(const PathDiagnostic& D, ...@@ -247,8 +247,9 @@ void HTMLDiagnostics::ReportDiag(const PathDiagnostic& D,
SmallString<128> Model, ResultPath; SmallString<128> Model, ResultPath;
llvm::sys::path::append(Model, Directory, "report-%%%%%%.html"); llvm::sys::path::append(Model, Directory, "report-%%%%%%.html");
if (llvm::error_code EC = if (llvm::error_code EC = llvm::sys::fs::unique_file(
llvm::sys::fs::unique_file(Model.str(), FD, ResultPath)) { Model.str(), FD, ResultPath, false,
llvm::sys::fs::all_read | llvm::sys::fs::all_write)) {
llvm::errs() << "warning: could not create file in '" << Directory llvm::errs() << "warning: could not create file in '" << Directory
<< "': " << EC.message() << '\n'; << "': " << EC.message() << '\n';
return; return;
......
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