[PATCH] D37823: Filenames are case-insensitive on Windows, so .DEF is the same as .def.
Rui Ueyama via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 14 11:34:45 PDT 2017
This revision was automatically updated to reflect the committed changes.
Closed by commit rL313285: Filenames are case-insensitive on Windows, so .DEF is the same as .def. (authored by ruiu).
Changed prior to commit:
https://reviews.llvm.org/D37823?vs=115106&id=115253#toc
Repository:
rL LLVM
https://reviews.llvm.org/D37823
Files:
lld/trunk/MinGW/Driver.cpp
lld/trunk/test/MinGW/driver.test
Index: lld/trunk/MinGW/Driver.cpp
===================================================================
--- lld/trunk/MinGW/Driver.cpp
+++ lld/trunk/MinGW/Driver.cpp
@@ -180,7 +180,7 @@
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()));
Index: lld/trunk/test/MinGW/driver.test
===================================================================
--- lld/trunk/test/MinGW/driver.test
+++ lld/trunk/test/MinGW/driver.test
@@ -26,8 +26,11 @@
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D37823.115253.patch
Type: text/x-patch
Size: 1178 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170914/06471657/attachment.bin>
More information about the llvm-commits
mailing list