summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen
diff options
context:
space:
mode:
authorNick Lewycky <nicholas@mxc.ca>2011-10-21 02:32:14 +0000
committerNick Lewycky <nicholas@mxc.ca>2011-10-21 02:32:14 +0000
commitba743b75cb555861ba16ae88f728f880bb7fa018 (patch)
tree4252716c20d652993e66a0c7fc5a0c7724f326ad /clang/lib/CodeGen
parent8f077161391865d46b05a9a50dffa0eedc3d6deb (diff)
downloadbcm5719-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.cpp3
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;
OpenPOWER on IntegriCloud