From 89ea0b05207d45c145fb525df554b3b986ae379b Mon Sep 17 00:00:00 2001 From: Alexandre Ganea Date: Thu, 18 Jun 2020 08:57:50 -0400 Subject: [MC] Pass down argv0 & cc1 cmd-line to the back-end and store in MCTargetOptions When targetting CodeView, the goal is to store argv0 & cc1 cmd-line in the emitted .OBJ, in order to allow a reproducer from the .OBJ alone. This patch is to simplify https://reviews.llvm.org/D80833 --- clang/lib/Frontend/CreateInvocationFromCommandLine.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'clang/lib/Frontend/CreateInvocationFromCommandLine.cpp') diff --git a/clang/lib/Frontend/CreateInvocationFromCommandLine.cpp b/clang/lib/Frontend/CreateInvocationFromCommandLine.cpp index 18c4814..1d5a6c06 100644 --- a/clang/lib/Frontend/CreateInvocationFromCommandLine.cpp +++ b/clang/lib/Frontend/CreateInvocationFromCommandLine.cpp @@ -93,7 +93,7 @@ std::unique_ptr clang::createInvocationFromCommandLine( if (CC1Args) *CC1Args = {CCArgs.begin(), CCArgs.end()}; auto CI = std::make_unique(); - if (!CompilerInvocation::CreateFromArgs(*CI, CCArgs, *Diags) && + if (!CompilerInvocation::CreateFromArgs(*CI, CCArgs, *Diags, Args[0]) && !ShouldRecoverOnErorrs) return nullptr; return CI; -- cgit v1.1