[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 12:40:30 PDT 2022
pzheng updated this revision to Diff 436894.
pzheng added a comment.
Fix a typo
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/visitedlibs.test
Index: lld/test/COFF/visitedlibs.test
===================================================================
--- /dev/null
+++ lld/test/COFF/visitedlibs.test
@@ -0,0 +1,10 @@
+# RUN: rm -rf %t && mkdir -p %t
+# RUN: cp %S/Inputs/hello64.obj %t
+# RUN: cp %S/Inputs/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 %s
+
+CHECK: Reading {{.*}}/STD64.lib
+CHECK-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.436894.patch
Type: text/x-patch
Size: 895 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220614/dd50220d/attachment.bin>
More information about the llvm-commits
mailing list