summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/Driver/Driver.cpp2
-rw-r--r--clang/lib/Driver/Job.cpp11
2 files changed, 1 insertions, 12 deletions
diff --git a/clang/lib/Driver/Driver.cpp b/clang/lib/Driver/Driver.cpp
index baf154fbc58..ccefbd8c364 100644
--- a/clang/lib/Driver/Driver.cpp
+++ b/clang/lib/Driver/Driver.cpp
@@ -547,7 +547,7 @@ void Driver::generateCompilationDiagnostics(Compilation &C,
Diag(clang::diag::note_drv_command_failed_diag_msg)
<< "Error generating run script: " + Script + " " + EC.message();
} else {
- Cmd.Print(ScriptOS, "\n", /*Quote=*/false, &CrashInfo);
+ Cmd.Print(ScriptOS, "\n", /*Quote=*/true, &CrashInfo);
Diag(clang::diag::note_drv_command_failed_diag_msg) << Script;
}
Diag(clang::diag::note_drv_command_failed_diag_msg)
diff --git a/clang/lib/Driver/Job.cpp b/clang/lib/Driver/Job.cpp
index 34d38b904cc..c5b3f5a307b 100644
--- a/clang/lib/Driver/Job.cpp
+++ b/clang/lib/Driver/Job.cpp
@@ -73,12 +73,6 @@ static int skipArgs(const char *Flag) {
return 0;
}
-static bool quoteNextArg(const char *flag) {
- return llvm::StringSwitch<bool>(flag)
- .Case("-D", true)
- .Default(false);
-}
-
static void PrintArg(raw_ostream &OS, const char *Arg, bool Quote) {
const bool Escape = std::strpbrk(Arg, "\"\\$");
@@ -189,11 +183,6 @@ void Command::Print(raw_ostream &OS, const char *Terminator, bool Quote,
OS << ' ';
PrintArg(OS, Arg, Quote);
-
- if (CrashInfo && quoteNextArg(Arg) && i + 1 < e) {
- OS << ' ';
- PrintArg(OS, Args[++i], true);
- }
}
if (CrashInfo && !CrashInfo->VFSPath.empty()) {
OpenPOWER on IntegriCloud