[cfe-commits] r99215 - /cfe/trunk/lib/CodeGen/CGDebugInfo.cpp

Douglas Gregor dgregor at apple.com
Mon Mar 22 14:28:29 PDT 2010


Author: dgregor
Date: Mon Mar 22 16:28:29 2010
New Revision: 99215

URL: http://llvm.org/viewvc/llvm-project?rev=99215&view=rev
Log:
Comment the reasons for the strange little dance we do with the main file name for debug information

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

Modified: cfe/trunk/lib/CodeGen/CGDebugInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGDebugInfo.cpp?rev=99215&r1=99214&r2=99215&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGDebugInfo.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGDebugInfo.cpp Mon Mar 22 16:28:29 2010
@@ -112,6 +112,10 @@
   llvm::sys::Path AbsFileName(MainFileName);
   AbsFileName.makeAbsolute();
 
+  // The main file name provided via the "-main-file-name" option contains just
+  // the file name itself with no path information. This file name may have had
+  // a relative path, so we look into the actual file entry for the main
+  // file to determine the real absolute path for the file.
   std::string MainFileDir;
   if (const FileEntry *MainFile = SM.getFileEntryForID(SM.getMainFileID()))
     MainFileDir = MainFile->getDir()->getName();





More information about the cfe-commits mailing list