[PATCH] D40931: [COFF] Stop lowercasing paths in messages
Shoaib Meenai via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 6 16:35:11 PST 2017
smeenai created this revision.
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.
Repository:
rLLD LLVM Linker
https://reviews.llvm.org/D40931
Files:
COFF/InputFiles.cpp
test/COFF/filename-casing.s
Index: test/COFF/filename-casing.s
===================================================================
--- /dev/null
+++ test/COFF/filename-casing.s
@@ -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
Index: COFF/InputFiles.cpp
===================================================================
--- COFF/InputFiles.cpp
+++ COFF/InputFiles.cpp
@@ -497,10 +497,9 @@
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();
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D40931.125845.patch
Type: text/x-patch
Size: 1237 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171207/4a5013fa/attachment.bin>
More information about the llvm-commits
mailing list