]> granicus.if.org Git - clang/commitdiff
Always use current working directory for DW_AT_comp_dir.
authorDevang Patel <dpatel@apple.com>
Tue, 27 Jul 2010 20:49:59 +0000 (20:49 +0000)
committerDevang Patel <dpatel@apple.com>
Tue, 27 Jul 2010 20:49:59 +0000 (20:49 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109535 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGDebugInfo.cpp
lib/CodeGen/CGDebugInfo.h

index 0309c6e09ba6485d1b23597a6830fd5e615e1877..8e9f416d4fbda7cdca71c48b17b450af40f3d312 100644 (file)
@@ -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);
 }
index fc296acf4535b47d8d93cff556984782556702ad..b20506d47031ecfb0bd837112156cb31b8afb5c2 100644 (file)
@@ -199,10 +199,6 @@ private:
   llvm::DIDescriptor getContextDescriptor(const Decl *Decl,
                                           llvm::DIDescriptor &CU);
 
-  /// getCompDirname -  AT_comp_dir is empty if filename is absulte otherwise 
-  /// it points to compilation directory.
-  llvm::StringRef getCompDirname(llvm::StringRef Filename);
-
   /// getCurrentDirname - Return current directory name.
   llvm::StringRef getCurrentDirname();