[lld] r291219 - Use \ as the path separator on Windows.

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 6 00:59:33 PST 2017


Author: ruiu
Date: Fri Jan  6 02:59:32 2017
New Revision: 291219

URL: http://llvm.org/viewvc/llvm-project?rev=291219&view=rev
Log:
Use \ as the path separator on Windows.

Previously, when we printed out a path obtained from DWARF debug info,
we replaced \ with / on Windows. But that doesn't make sense. We should
respect the system's path separator.

Modified:
    lld/trunk/ELF/InputFiles.cpp

Modified: lld/trunk/ELF/InputFiles.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/InputFiles.cpp?rev=291219&r1=291218&r2=291219&view=diff
==============================================================================
--- lld/trunk/ELF/InputFiles.cpp (original)
+++ lld/trunk/ELF/InputFiles.cpp Fri Jan  6 02:59:32 2017
@@ -92,8 +92,7 @@ std::string elf::ObjectFile<ELFT>::getLi
       DILineInfoSpecifier::FileLineInfoKind::AbsoluteFilePath, Info);
   if (Info.Line == 0)
     return "";
-  return convertToUnixPathSeparator(Info.FileName) + ":" +
-         std::to_string(Info.Line);
+  return Info.FileName + ":" + std::to_string(Info.Line);
 }
 
 // Returns "(internal)", "foo.a(bar.o)" or "baz.o".




More information about the llvm-commits mailing list