[llvm-commits] [llvm-gcc-4.2] r62726 - /llvm-gcc-4.2/trunk/gcc/llvm-debug.cpp

Devang Patel dpatel at apple.com
Wed Jan 21 14:47:22 PST 2009


Author: dpatel
Date: Wed Jan 21 16:47:22 2009
New Revision: 62726

URL: http://llvm.org/viewvc/llvm-project?rev=62726&view=rev
Log:
It is a good idea to use separate directory for compile unit if all other source locations are separating file name and directory names.

Modified:
    llvm-gcc-4.2/trunk/gcc/llvm-debug.cpp

Modified: llvm-gcc-4.2/trunk/gcc/llvm-debug.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/llvm-debug.cpp?rev=62726&r1=62725&r2=62726&view=diff

==============================================================================
--- llvm-gcc-4.2/trunk/gcc/llvm-debug.cpp (original)
+++ llvm-gcc-4.2/trunk/gcc/llvm-debug.cpp Wed Jan 21 16:47:22 2009
@@ -757,6 +757,8 @@
 DICompileUnit DebugInfo::createCompileUnit(const std::string &FullPath){
   // Get source file information.
   std::string Directory;
+  std::string FileName;
+  DirectoryAndFile(FullPath, Directory, FileName);
   
   // Set up Language number.
   unsigned LangTag;
@@ -780,7 +782,7 @@
   else
     LangTag = DW_LANG_C89;
 
-  return DebugFactory.CreateCompileUnit(LangTag, FullPath, "",
+  return DebugFactory.CreateCompileUnit(LangTag, FileName, Directory, 
                                         version_string);
 }
 





More information about the llvm-commits mailing list