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/CodeGen | |
| parent | 8f077161391865d46b05a9a50dffa0eedc3d6deb (diff) | |
| download | bcm5719-llvm-ba743b75cb555861ba16ae88f728f880bb7fa018.tar.gz bcm5719-llvm-ba743b75cb555861ba16ae88f728f880bb7fa018.zip | |
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/CodeGen')
| -rw-r--r-- | clang/lib/CodeGen/CGDebugInfo.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp index d4b566bb20f..2e1d12d8ce8 100644 --- a/clang/lib/CodeGen/CGDebugInfo.cpp +++ b/clang/lib/CodeGen/CGDebugInfo.cpp @@ -250,6 +250,9 @@ unsigned CGDebugInfo::getColumnNumber(SourceLocation Loc) { } StringRef CGDebugInfo::getCurrentDirname() { + if (!CGM.getCodeGenOpts().DebugCompilationDir.empty()) + return CGM.getCodeGenOpts().DebugCompilationDir; + if (!CWDName.empty()) return CWDName; llvm::SmallString<256> CWD; |

