diff options
author | Devang Patel <dpatel@apple.com> | 2010-07-27 20:49:59 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2010-07-27 20:49:59 +0000 |
commit | 58115009ba6406c2a0bcc5a5033592bd5f2fad30 (patch) | |
tree | ad934bc2e4d125d8b6ecbebde35ba380eb9d2c73 /lib/CodeGen/CGDebugInfo.cpp | |
parent | 787b0946959d1203d5bb95a298ee2e7286ded995 (diff) |
Always use current working directory for DW_AT_comp_dir.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109535 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGDebugInfo.cpp')
-rw-r--r-- | lib/CodeGen/CGDebugInfo.cpp | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/lib/CodeGen/CGDebugInfo.cpp b/lib/CodeGen/CGDebugInfo.cpp index 0309c6e09b..8e9f416d4f 100644 --- a/lib/CodeGen/CGDebugInfo.cpp +++ b/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); } |