[cfe-commits] r109535 - in /cfe/trunk/lib/CodeGen: CGDebugInfo.cpp CGDebugInfo.h

Devang Patel dpatel at apple.com
Tue Jul 27 13:49:59 PDT 2010


Author: dpatel
Date: Tue Jul 27 15:49:59 2010
New Revision: 109535

URL: http://llvm.org/viewvc/llvm-project?rev=109535&view=rev
Log:
Always use current working directory for DW_AT_comp_dir.

Modified:
    cfe/trunk/lib/CodeGen/CGDebugInfo.cpp
    cfe/trunk/lib/CodeGen/CGDebugInfo.h

Modified: cfe/trunk/lib/CodeGen/CGDebugInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGDebugInfo.cpp?rev=109535&r1=109534&r2=109535&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGDebugInfo.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGDebugInfo.cpp Tue Jul 27 15:49:59 2010
@@ -184,15 +184,6 @@
   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 @@
 
   // Create new compile unit.
   TheCU = DebugFactory.CreateCompileUnit(
-    LangTag, Filename, getCompDirname(Filename),
+    LangTag, Filename, getCurrentDirname(),
     Producer, true,
     LO.Optimize, CGM.getCodeGenOpts().DwarfDebugFlags, RuntimeVers);
 }

Modified: cfe/trunk/lib/CodeGen/CGDebugInfo.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGDebugInfo.h?rev=109535&r1=109534&r2=109535&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGDebugInfo.h (original)
+++ cfe/trunk/lib/CodeGen/CGDebugInfo.h Tue Jul 27 15:49:59 2010
@@ -199,10 +199,6 @@
   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();
 





More information about the cfe-commits mailing list