summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGDebugInfo.cpp
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2010-07-27 20:49:59 +0000
committerDevang Patel <dpatel@apple.com>2010-07-27 20:49:59 +0000
commit4f6e73b168ffdc6f338f0221628a519ea50d4249 (patch)
tree687348ca0685ed44fda1f9ac19e9e57430f32b4b /clang/lib/CodeGen/CGDebugInfo.cpp
parent93da3b2e411059f580bcc3e2e13b0bd6bf2e16fe (diff)
downloadbcm5719-llvm-4f6e73b168ffdc6f338f0221628a519ea50d4249.tar.gz
bcm5719-llvm-4f6e73b168ffdc6f338f0221628a519ea50d4249.zip
Always use current working directory for DW_AT_comp_dir.
llvm-svn: 109535
Diffstat (limited to 'clang/lib/CodeGen/CGDebugInfo.cpp')
-rw-r--r--clang/lib/CodeGen/CGDebugInfo.cpp11
1 files changed, 1 insertions, 10 deletions
diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp
index 0309c6e09ba..8e9f416d4fb 100644
--- a/clang/lib/CodeGen/CGDebugInfo.cpp
+++ b/clang/lib/CodeGen/CGDebugInfo.cpp
@@ -184,15 +184,6 @@ llvm::StringRef CGDebugInfo::getCurrentDirname() {
return CWDName = llvm::StringRef(CompDirnamePtr, CWD.size());
}
-/// getCompDirname - AT_comp_dir is empty if filename is absulte otherwise
-/// it points to compilation directory.
-llvm::StringRef CGDebugInfo::getCompDirname(llvm::StringRef Filename) {
- llvm::sys::Path FilePath(Filename);
- if (FilePath.isAbsolute())
- return llvm::StringRef();
- return getCurrentDirname();
-}
-
/// CreateCompileUnit - Create new compile unit.
void CGDebugInfo::CreateCompileUnit() {
@@ -246,7 +237,7 @@ void CGDebugInfo::CreateCompileUnit() {
// Create new compile unit.
TheCU = DebugFactory.CreateCompileUnit(
- LangTag, Filename, getCompDirname(Filename),
+ LangTag, Filename, getCurrentDirname(),
Producer, true,
LO.Optimize, CGM.getCodeGenOpts().DwarfDebugFlags, RuntimeVers);
}
OpenPOWER on IntegriCloud