Skip to content

Commit 9a5161e

Browse files
committedDec 7, 2017
[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 llvm-svn: 319996
1 parent 23b3f6d commit 9a5161e

File tree

2 files changed

+18
-5
lines changed

2 files changed

+18
-5
lines changed
 

‎lld/COFF/InputFiles.cpp

+4-5
Original file line numberDiff line numberDiff line change
@@ -497,10 +497,9 @@ std::string lld::toString(const coff::InputFile *File) {
497497
if (!File)
498498
return "<internal>";
499499
if (File->ParentName.empty())
500-
return File->getName().lower();
500+
return File->getName();
501501

502-
std::string Res =
503-
(getBasename(File->ParentName) + "(" + getBasename(File->getName()) + ")")
504-
.str();
505-
return StringRef(Res).lower();
502+
return (getBasename(File->ParentName) + "(" + getBasename(File->getName()) +
503+
")")
504+
.str();
506505
}

‎lld/test/COFF/filename-casing.s

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# REQUIRES: x86
2+
3+
# RUN: llvm-mc -filetype=obj -triple=x86_64-windows-msvc -o %T/MixedCase.obj %s
4+
# RUN: not lld-link /entry:main %T/MixedCase.obj 2>&1 | FileCheck -check-prefix=OBJECT %s
5+
6+
# RUN: llvm-lib /out:%T/MixedCase.lib %T/MixedCase.obj
7+
# RUN: not lld-link /machine:x64 /entry:main %T/MixedCase.lib 2>&1 | FileCheck -check-prefix=ARCHIVE %s
8+
9+
# OBJECT: MixedCase.obj: undefined symbol: f
10+
# ARCHIVE: MixedCase.lib(MixedCase.obj): undefined symbol: f
11+
12+
.globl main
13+
main:
14+
callq f

0 commit comments

Comments
 (0)
Please sign in to comment.