mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-03-04 08:27:50 +00:00
Driver: Fix think-o in adding -ivfsoverlay flag to crashdumps
If there isn't a VFS to overlay we shouldn't be adding a -ivfsoverlay flag. llvm-svn: 212468
This commit is contained in:
parent
e218cd77b4
commit
761439962b
@ -550,9 +550,11 @@ void Driver::generateCompilationDiagnostics(Compilation &C,
|
||||
E = I + OldFilename.size();
|
||||
I = Cmd.rfind(" ", I) + 1;
|
||||
Cmd.replace(I, E - I, NewFilename.data(), NewFilename.size());
|
||||
// Add the VFS overlay to the reproduction script.
|
||||
I += NewFilename.size();
|
||||
Cmd.insert(I, std::string(" -ivfsoverlay ") + VFS.c_str());
|
||||
if (!VFS.empty()) {
|
||||
// Add the VFS overlay to the reproduction script.
|
||||
I += NewFilename.size();
|
||||
Cmd.insert(I, std::string(" -ivfsoverlay ") + VFS.c_str());
|
||||
}
|
||||
ScriptOS << Cmd;
|
||||
Diag(clang::diag::note_drv_command_failed_diag_msg) << Script;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user