[lld] r319996 - [COFF] Stop lowercasing paths in messages

Shoaib Meenai via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 6 17:21:27 PST 2017


Author: smeenai
Date: Wed Dec  6 17:21:27 2017
New Revision: 319996

URL: http://llvm.org/viewvc/llvm-project?rev=319996&view=rev
Log:
[COFF] Stop lowercasing paths in messages

It's pretty annoying to have LLD lowercase paths in error messages when
cross-compiling from a case-sensitive filesystem, since e.g. if I want
to examine the problematic object file, I have to perform some manual
case correction instead of just being able to copy the path from the
error message.

Differential Revision: https://reviews.llvm.org/D40931

Added:
    lld/trunk/test/COFF/filename-casing.s
Modified:
    lld/trunk/COFF/InputFiles.cpp

Modified: lld/trunk/COFF/InputFiles.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/COFF/InputFiles.cpp?rev=319996&r1=319995&r2=319996&view=diff
==============================================================================
--- lld/trunk/COFF/InputFiles.cpp (original)
+++ lld/trunk/COFF/InputFiles.cpp Wed Dec  6 17:21:27 2017
@@ -497,10 +497,9 @@ std::string lld::toString(const coff::In
   if (!File)
     return "<internal>";
   if (File->ParentName.empty())
-    return File->getName().lower();
+    return File->getName();
 
-  std::string Res =
-      (getBasename(File->ParentName) + "(" + getBasename(File->getName()) + ")")
-          .str();
-  return StringRef(Res).lower();
+  return (getBasename(File->ParentName) + "(" + getBasename(File->getName()) +
+          ")")
+      .str();
 }

Added: lld/trunk/test/COFF/filename-casing.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/COFF/filename-casing.s?rev=319996&view=auto
==============================================================================
--- lld/trunk/test/COFF/filename-casing.s (added)
+++ lld/trunk/test/COFF/filename-casing.s Wed Dec  6 17:21:27 2017
@@ -0,0 +1,14 @@
+# REQUIRES: x86
+
+# RUN: llvm-mc -filetype=obj -triple=x86_64-windows-msvc -o %T/MixedCase.obj %s
+# RUN: not lld-link /entry:main %T/MixedCase.obj 2>&1 | FileCheck -check-prefix=OBJECT %s
+
+# RUN: llvm-lib /out:%T/MixedCase.lib %T/MixedCase.obj
+# RUN: not lld-link /machine:x64 /entry:main %T/MixedCase.lib 2>&1 | FileCheck -check-prefix=ARCHIVE %s
+
+# OBJECT: MixedCase.obj: undefined symbol: f
+# ARCHIVE: MixedCase.lib(MixedCase.obj): undefined symbol: f
+
+.globl main
+main:
+	callq	f




More information about the llvm-commits mailing list