diff options
author | Nick Lewycky <nicholas@mxc.ca> | 2011-10-21 02:32:14 +0000 |
---|---|---|
committer | Nick Lewycky <nicholas@mxc.ca> | 2011-10-21 02:32:14 +0000 |
commit | ba743b75cb555861ba16ae88f728f880bb7fa018 (patch) | |
tree | 4252716c20d652993e66a0c7fc5a0c7724f326ad /clang/lib/Frontend/CompilerInvocation.cpp | |
parent | 8f077161391865d46b05a9a50dffa0eedc3d6deb (diff) | |
download | llvm-ba743b75cb555861ba16ae88f728f880bb7fa018.zip llvm-ba743b75cb555861ba16ae88f728f880bb7fa018.tar.gz llvm-ba743b75cb555861ba16ae88f728f880bb7fa018.tar.bz2 |
Take DW_AT_comp_dir from $PWD when it's present and starts with a '/'. This is
closer to what GCC does, except that GCC also checks that the inodes for $PWD
and '.' match.
llvm-svn: 142633
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r-- | clang/lib/Frontend/CompilerInvocation.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp index 05d2e69..76ceb9b 100644 --- a/clang/lib/Frontend/CompilerInvocation.cpp +++ b/clang/lib/Frontend/CompilerInvocation.cpp @@ -131,6 +131,10 @@ static void CodeGenOptsToArgs(const CodeGenOptions &Opts, Res.push_back("-disable-llvm-optzns"); if (Opts.DisableRedZone) Res.push_back("-disable-red-zone"); + if (!Opts.DebugCompilationDir.empty()) { + Res.push_back("-fdebug-compilation-dir"); + Res.push_back(Opts.DebugCompilationDir); + } if (!Opts.DwarfDebugFlags.empty()) { Res.push_back("-dwarf-debug-flags"); Res.push_back(Opts.DwarfDebugFlags); @@ -1071,6 +1075,7 @@ static void ParseCodeGenArgs(CodeGenOptions &Opts, ArgList &Args, InputKind IK, Opts.EmitGcovArcs = Args.hasArg(OPT_femit_coverage_data); Opts.EmitGcovNotes = Args.hasArg(OPT_femit_coverage_notes); Opts.CoverageFile = Args.getLastArgValue(OPT_coverage_file); + Opts.DebugCompilationDir = Args.getLastArgValue(OPT_fdebug_compilation_dir); if (Arg *A = Args.getLastArg(OPT_fobjc_dispatch_method_EQ)) { StringRef Name = A->getValue(Args); |