[PATCH] D127709: [LLD][COFF] Convert file name to lowercase when inserting it into visitedLibs
Pengxuan Zheng via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 14 11:59:40 PDT 2022
pzheng updated this revision to Diff 436875.
pzheng added a comment.
Add a test case
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D127709/new/
https://reviews.llvm.org/D127709
Files:
lld/COFF/Driver.cpp
lld/test/COFF/nodefaultlib.test
Index: lld/test/COFF/nodefaultlib.test
===================================================================
--- lld/test/COFF/nodefaultlib.test
+++ lld/test/COFF/nodefaultlib.test
@@ -36,3 +36,11 @@
UPPERCASE-NOT: OLDNAMES
UPPERCASE-NOT: LIBCMT
+
+# RUN: mv %T/std64.lib %T/STD64.lib
+# RUN: lld-link %T/STD64.lib /out:%t.exe /entry:main \
+# RUN: /subsystem:console %T/hello64.obj /defaultlib:STD64.lib \
+# RUN: /verbose 2>&1 | FileCheck -check-prefix=CHECK4 %s
+
+CHECK4: Reading {{.*}}/STD64.lib
+CHECK4-NOT: could not open 'STD64.lib'
Index: lld/COFF/Driver.cpp
===================================================================
--- lld/COFF/Driver.cpp
+++ lld/COFF/Driver.cpp
@@ -473,7 +473,7 @@
}
if (path.endswith_insensitive(".lib"))
- visitedLibs.insert(std::string(sys::path::filename(path)));
+ visitedLibs.insert(std::string(sys::path::filename(path).lower()));
return path;
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D127709.436875.patch
Type: text/x-patch
Size: 918 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220614/56bc1065/attachment.bin>
More information about the llvm-commits
mailing list