[lld] r313285 - Filenames are case-insensitive on Windows, so .DEF is the same as .def.
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 14 11:33:09 PDT 2017
Author: ruiu
Date: Thu Sep 14 11:33:09 2017
New Revision: 313285
URL: http://llvm.org/viewvc/llvm-project?rev=313285&view=rev
Log:
Filenames are case-insensitive on Windows, so .DEF is the same as .def.
Differential Revision: https://reviews.llvm.org/D37823
Modified:
lld/trunk/MinGW/Driver.cpp
lld/trunk/test/MinGW/driver.test
Modified: lld/trunk/MinGW/Driver.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/MinGW/Driver.cpp?rev=313285&r1=313284&r2=313285&view=diff
==============================================================================
--- lld/trunk/MinGW/Driver.cpp (original)
+++ lld/trunk/MinGW/Driver.cpp Thu Sep 14 11:33:09 2017
@@ -180,7 +180,7 @@ bool mingw::link(ArrayRef<const char *>
for (auto *A : Args) {
switch (A->getOption().getUnaliasedOption().getID()) {
case OPT_INPUT:
- if (StringRef(A->getValue()).endswith(".def"))
+ if (StringRef(A->getValue()).endswith_lower(".def"))
Add("-def:" + StringRef(A->getValue()));
else
Add(Prefix + StringRef(A->getValue()));
Modified: lld/trunk/test/MinGW/driver.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/MinGW/driver.test?rev=313285&r1=313284&r2=313285&view=diff
==============================================================================
--- lld/trunk/test/MinGW/driver.test (original)
+++ lld/trunk/test/MinGW/driver.test Thu Sep 14 11:33:09 2017
@@ -26,8 +26,11 @@ RUN: ld.lld -### foo.o -m i386pep -share
SHARED: -out:a.dll
SHARED-SAME: -dll
-RUN: ld.lld -### foo.o -m i386pep -shared foo.def | FileCheck -check-prefix=DEF %s
-DEF: -def:foo.def
+RUN: ld.lld -### foo.o -m i386pep -shared foo.def | FileCheck -check-prefix=DEF1 %s
+DEF1: -def:foo.def
+
+RUN: ld.lld -### foo.o -m i386pep -shared FOO.DEF | FileCheck -check-prefix=DEF2 %s
+DEF2: -def:FOO.DEF
RUN: ld.lld -### foo.o -m i386pep -o bar.exe | FileCheck -check-prefix=OUT %s
OUT: -out:bar.exe
More information about the llvm-commits
mailing list