diff options
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r-- | clang/lib/Frontend/CompilerInvocation.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp index 4c05717..1af4153 100644 --- a/clang/lib/Frontend/CompilerInvocation.cpp +++ b/clang/lib/Frontend/CompilerInvocation.cpp @@ -3627,7 +3627,8 @@ static void ParseTargetArgs(TargetOptions &Opts, ArgList &Args, bool CompilerInvocation::CreateFromArgs(CompilerInvocation &Res, ArrayRef<const char *> CommandLineArgs, - DiagnosticsEngine &Diags) { + DiagnosticsEngine &Diags, + const char *Argv0) { bool Success = true; // Parse the arguments. @@ -3747,6 +3748,11 @@ bool CompilerInvocation::CreateFromArgs(CompilerInvocation &Res, Res.getCodeGenOpts().FineGrainedBitfieldAccesses = false; Diags.Report(diag::warn_drv_fine_grained_bitfield_accesses_ignored); } + + // Store the command-line for using in the CodeView backend. + Res.getCodeGenOpts().Argv0 = Argv0; + Res.getCodeGenOpts().CommandLineArgs = CommandLineArgs; + return Success; } |